]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
init/do_mounts: initrd_load() can be boolean
authorYaowei Bai <baiyaowei@cmss.chinamobile.com>
Wed, 20 Jan 2016 22:59:29 +0000 (14:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2016 01:09:18 +0000 (17:09 -0800)
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>
init/do_mounts.h
init/do_mounts_initrd.c

index f5b978a9bb92892a5e876ae3ce1338ad8a896e04..067af1d9e8b620bfac146dae57d0a0f690b33475 100644 (file)
@@ -57,11 +57,11 @@ static inline int rd_load_image(char *from) { return 0; }
 
 #ifdef CONFIG_BLK_DEV_INITRD
 
-int __init initrd_load(void);
+bool __init initrd_load(void);
 
 #else
 
-static inline int initrd_load(void) { return 0; }
+static inline bool initrd_load(void) { return false; }
 
 #endif
 
index 3e0878e8a80d65548ffac907a3285f9deea8d5a3..a1000ca29fc9971f82609c8cba8d137b01452603 100644 (file)
@@ -116,7 +116,7 @@ static void __init handle_initrd(void)
        }
 }
 
-int __init initrd_load(void)
+bool __init initrd_load(void)
 {
        if (mount_initrd) {
                create_dev("/dev/ram", Root_RAM0);
@@ -129,9 +129,9 @@ int __init initrd_load(void)
                if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
                        sys_unlink("/initrd.image");
                        handle_initrd();
-                       return 1;
+                       return true;
                }
        }
        sys_unlink("/initrd.image");
-       return 0;
+       return false;
 }