diff options
author | Yaowei Bai <baiyaowei@cmss.chinamobile.com> | 2016-01-20 17:59:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-20 20:09:18 -0500 |
commit | f057f3b226a5c513aafaa5ece94f3a7f363215c5 (patch) | |
tree | 6f0eb6c6348f1b5a43aa809849a3e94ab7676512 /init | |
parent | 31c025b5fece8d0fdc88920065fbc1ff7e4a78b1 (diff) |
init/do_mounts: initrd_load() can be boolean
Make initrd_load() 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/do_mounts.h | 4 | ||||
-rw-r--r-- | init/do_mounts_initrd.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/init/do_mounts.h b/init/do_mounts.h index f5b978a9bb92..067af1d9e8b6 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h | |||
@@ -57,11 +57,11 @@ static inline int rd_load_image(char *from) { return 0; } | |||
57 | 57 | ||
58 | #ifdef CONFIG_BLK_DEV_INITRD | 58 | #ifdef CONFIG_BLK_DEV_INITRD |
59 | 59 | ||
60 | int __init initrd_load(void); | 60 | bool __init initrd_load(void); |
61 | 61 | ||
62 | #else | 62 | #else |
63 | 63 | ||
64 | static inline int initrd_load(void) { return 0; } | 64 | static inline bool initrd_load(void) { return false; } |
65 | 65 | ||
66 | #endif | 66 | #endif |
67 | 67 | ||
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 3e0878e8a80d..a1000ca29fc9 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c | |||
@@ -116,7 +116,7 @@ static void __init handle_initrd(void) | |||
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | int __init initrd_load(void) | 119 | bool __init initrd_load(void) |
120 | { | 120 | { |
121 | if (mount_initrd) { | 121 | if (mount_initrd) { |
122 | create_dev("/dev/ram", Root_RAM0); | 122 | create_dev("/dev/ram", Root_RAM0); |
@@ -129,9 +129,9 @@ int __init initrd_load(void) | |||
129 | if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) { | 129 | if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) { |
130 | sys_unlink("/initrd.image"); | 130 | sys_unlink("/initrd.image"); |
131 | handle_initrd(); | 131 | handle_initrd(); |
132 | return 1; | 132 | return true; |
133 | } | 133 | } |
134 | } | 134 | } |
135 | sys_unlink("/initrd.image"); | 135 | sys_unlink("/initrd.image"); |
136 | return 0; | 136 | return false; |
137 | } | 137 | } |