mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikanth Karthikesan <knikanth@suse.de>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Fix compiler warning unused clean_rootfs when CONFIG_BLK_DEV_RAM is not defined
Date: Thu, 9 Apr 2009 14:08:55 +0530	[thread overview]
Message-ID: <200904091408.56401.knikanth@suse.de> (raw)

Resending as I missed the list, earlier.

Thanks
Nikanth

Fix gcc warning, "unused clean_rootfs", when CONFIG_BLK_DEV_RAM not defined.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>

---
diff --git a/init/initramfs.c b/init/initramfs.c
index 80cd713..e44f2d9 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -515,6 +515,7 @@ skip:
 	initrd_end = 0;
 }
 
+#ifdef CONFIG_BLK_DEV_RAM
 #define BUF_SIZE 1024
 static void __init clean_rootfs(void)
 {
@@ -561,6 +562,7 @@ static void __init clean_rootfs(void)
 	sys_close(fd);
 	kfree(buf);
 }
+#endif
 
 static int __init populate_rootfs(void)
 {




                 reply	other threads:[~2009-04-09  8:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200904091408.56401.knikanth@suse.de \
    --to=knikanth@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome