Skip to content

Commit

Permalink
init/main.c: obsolete_checksetup can be boolean
Browse files Browse the repository at this point in the history
Make obsolete_checksetup() return bool due to this particular function
only using either one or zero as its return value.

No functional change.

Signed-off-by: Yaowei Bai <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Yaowei Bai authored and torvalds committed Jan 21, 2016
1 parent df0108c commit 31c025b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ static const char *panic_later, *panic_param;

extern const struct obs_kernel_param __setup_start[], __setup_end[];

static int __init obsolete_checksetup(char *line)
static bool __init obsolete_checksetup(char *line)
{
const struct obs_kernel_param *p;
int had_early_param = 0;
bool had_early_param = false;

p = __setup_start;
do {
Expand All @@ -179,13 +179,13 @@ static int __init obsolete_checksetup(char *line)
* Keep iterating, as we can have early
* params and __setups of same names 8( */
if (line[n] == '\0' || line[n] == '=')
had_early_param = 1;
had_early_param = true;
} else if (!p->setup_func) {
pr_warn("Parameter %s is obsolete, ignored\n",
p->str);
return 1;
return true;
} else if (p->setup_func(line + n))
return 1;
return true;
}
p++;
} while (p < __setup_end);
Expand Down

0 comments on commit 31c025b

Please sign in to comment.