[PATCH] init/initramfs.c: unused function when compiling without CONFIG_BLK_DEV_RAM

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <mingo@...>, <steven@...>
Date: Monday, September 8, 2008 - 7:19 pm

Fixing compiler warning when the kernel isn't compiled with support
for RAM block devices enabled.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
---
 init/initramfs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index da8d030..2f056e2 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -512,6 +512,7 @@ skip:
 	initrd_end = 0;
 }
 
+#ifdef CONFIG_BLK_DEV_RAM
 #define BUF_SIZE 1024
 static void __init clean_rootfs(void)
 {
@@ -558,6 +559,7 @@ static void __init clean_rootfs(void)
 	sys_close(fd);
 	kfree(buf);
 }
+#endif
 
 static int __init populate_rootfs(void)
 {
-- 
1.6.0.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] init/initramfs.c: unused function when compiling wit..., Steven Noonan, (Mon Sep 8, 7:19 pm)