aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorYaowei Bai <baiyaowei@cmss.chinamobile.com>2016-01-20 17:59:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-20 20:09:18 -0500
commit31c025b5fece8d0fdc88920065fbc1ff7e4a78b1 (patch)
tree4e64188cd07974bc61d7a47326f8618e54e5e155 /init
parentdf0108c5da561c66c333bb46bfe3c1fc65905898 (diff)
init/main.c: obsolete_checksetup can be boolean
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 <baiyaowei@cmss.chinamobile.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/init/main.c b/init/main.c
index c6ebefafa496..58c9e374704b 100644
--- a/init/main.c
+++ b/init/main.c
@@ -164,10 +164,10 @@ static const char *panic_later, *panic_param;
164 164
165extern const struct obs_kernel_param __setup_start[], __setup_end[]; 165extern const struct obs_kernel_param __setup_start[], __setup_end[];
166 166
167static int __init obsolete_checksetup(char *line) 167static bool __init obsolete_checksetup(char *line)
168{ 168{
169 const struct obs_kernel_param *p; 169 const struct obs_kernel_param *p;
170 int had_early_param = 0; 170 bool had_early_param = false;
171 171
172 p = __setup_start; 172 p = __setup_start;
173 do { 173 do {
@@ -179,13 +179,13 @@ static int __init obsolete_checksetup(char *line)
179 * Keep iterating, as we can have early 179 * Keep iterating, as we can have early
180 * params and __setups of same names 8( */ 180 * params and __setups of same names 8( */
181 if (line[n] == '\0' || line[n] == '=') 181 if (line[n] == '\0' || line[n] == '=')
182 had_early_param = 1; 182 had_early_param = true;
183 } else if (!p->setup_func) { 183 } else if (!p->setup_func) {
184 pr_warn("Parameter %s is obsolete, ignored\n", 184 pr_warn("Parameter %s is obsolete, ignored\n",
185 p->str); 185 p->str);
186 return 1; 186 return true;
187 } else if (p->setup_func(line + n)) 187 } else if (p->setup_func(line + n))
188 return 1; 188 return true;
189 } 189 }
190 p++; 190 p++;
191 } while (p < __setup_end); 191 } while (p < __setup_end);