Skip to content

Commit b52bb37

Browse files
Nikanth Karthikesantorvalds
authored andcommitted
init/initramfs: fix warning with CONFIG_BLK_DEV_RAM=n
init/initramfs.c:520: warning: 'clean_rootfs' defined but not used Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 2f6f6c6 commit b52bb37

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎init/initramfs.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ static void __init free_initrd(void)
515515
initrd_end = 0;
516516
}
517517

518+
#ifdef CONFIG_BLK_DEV_RAM
518519
#define BUF_SIZE 1024
519520
static void __init clean_rootfs(void)
520521
{
@@ -561,6 +562,7 @@ static void __init clean_rootfs(void)
561562
sys_close(fd);
562563
kfree(buf);
563564
}
565+
#endif
564566

565567
static int __init populate_rootfs(void)
566568
{

0 commit comments

Comments
 (0)