Skip to content

Commit

Permalink
init/do_mounts: initrd_load() can be boolean
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Yaowei Bai authored and torvalds committed Jan 21, 2016
1 parent 31c025b commit f057f3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions init/do_mounts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions init/do_mounts_initrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

0 comments on commit f057f3b

Please sign in to comment.