Skip to content

Commit 7b83299

Browse files
rddunlapRussell King (Oracle)
authored andcommitted
ARM: 9182/1: mmu: fix returns from early_param() and __setup() functions
early_param() handlers should return 0 on success. __setup() handlers should return 1 on success, i.e., the parameter has been handled. A return of 0 would cause the "option=value" string to be added to init's environment strings, polluting it. ../arch/arm/mm/mmu.c: In function 'test_early_cachepolicy': ../arch/arm/mm/mmu.c:215:1: error: no return statement in function returning non-void [-Werror=return-type] ../arch/arm/mm/mmu.c: In function 'test_noalign_setup': ../arch/arm/mm/mmu.c:221:1: error: no return statement in function returning non-void [-Werror=return-type] Fixes: b849a60 ("ARM: make cr_alignment read-only #ifndef CONFIG_CPU_CP15") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Igor Zhbanov <[email protected]> Cc: Uwe Kleine-König <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent 11c57c3 commit 7b83299

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm/mm/mmu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,14 @@ early_param("ecc", early_ecc);
212212
static int __init early_cachepolicy(char *p)
213213
{
214214
pr_warn("cachepolicy kernel parameter not supported without cp15\n");
215+
return 0;
215216
}
216217
early_param("cachepolicy", early_cachepolicy);
217218

218219
static int __init noalign_setup(char *__unused)
219220
{
220221
pr_warn("noalign kernel parameter not supported without cp15\n");
222+
return 1;
221223
}
222224
__setup("noalign", noalign_setup);
223225

0 commit comments

Comments
 (0)