Skip to content

Commit

Permalink
Remove superfluous checks for CONFIG_BLK_DEV_INITRD from initramfs.c
Browse files Browse the repository at this point in the history
Given that init/Makefile includes initramfs.c in the build only if
CONFIG_BLK_DEV_INITRD is defined, there seems to be no point checking for
it yet again.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rpjday authored and Linus Torvalds committed Feb 6, 2008
1 parent d99c4f6 commit b25b781
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions init/initramfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ static int __init retain_initrd_param(char *str)
__setup("retain_initrd", retain_initrd_param);

extern char __initramfs_start[], __initramfs_end[];
#ifdef CONFIG_BLK_DEV_INITRD
#include <linux/initrd.h>
#include <linux/kexec.h>

Expand Down Expand Up @@ -539,15 +538,12 @@ static void __init free_initrd(void)
initrd_end = 0;
}

#endif

static int __init populate_rootfs(void)
{
char *err = unpack_to_rootfs(__initramfs_start,
__initramfs_end - __initramfs_start, 0);
if (err)
panic(err);
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start) {
#ifdef CONFIG_BLK_DEV_RAM
int fd;
Expand Down Expand Up @@ -579,7 +575,6 @@ static int __init populate_rootfs(void)
free_initrd();
#endif
}
#endif
return 0;
}
rootfs_initcall(populate_rootfs);

0 comments on commit b25b781

Please sign in to comment.