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>
This commit is contained in:
Родитель
31c025b5fe
Коммит
f057f3b226
|
@ -57,11 +57,11 @@ static inline int rd_load_image(char *from) { return 0; }
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
|
|
||||||
int __init initrd_load(void);
|
bool __init initrd_load(void);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline int initrd_load(void) { return 0; }
|
static inline bool initrd_load(void) { return false; }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ static void __init handle_initrd(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int __init initrd_load(void)
|
bool __init initrd_load(void)
|
||||||
{
|
{
|
||||||
if (mount_initrd) {
|
if (mount_initrd) {
|
||||||
create_dev("/dev/ram", Root_RAM0);
|
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) {
|
if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
|
||||||
sys_unlink("/initrd.image");
|
sys_unlink("/initrd.image");
|
||||||
handle_initrd();
|
handle_initrd();
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sys_unlink("/initrd.image");
|
sys_unlink("/initrd.image");
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче