Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1270785
| From | Yaowei Bai <baiyaowei@cmss.chinamobile.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] init/main.c: obsolete_checksetup can be boolean |
| Date | 2015-11-17 04:20 +0100 |
| Message-ID | <qvEYh-7Qv-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
This patch makes 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>
---
init/main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/init/main.c b/init/main.c
index 9e64d70..23449b7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -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 {
@@ -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);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] init/main.c: obsolete_checksetup can be boolean Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2015-11-17 04:20 +0100 [PATCH 2/2] init/do_mounts: initrd_load can be boolean Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2015-11-17 04:20 +0100
csiph-web