From: Qian Cai <cai@lca.pw>
To: akpm@linux-foundation.org
Cc: hch@lst.de, rppt@linux.ibm.com, linux-kernel@vger.kernel.org,
Qian Cai <cai@lca.pw>
Subject: [PATCH -mmots] initramfs: fix a compilation error
Date: Wed, 27 Mar 2019 21:48:06 -0400 [thread overview]
Message-ID: <20190328014806.36375-1-cai@lca.pw> (raw)
The commit 754006569c54 ("initramfs: cleanup populate_rootfs")
introduced a compilation error with CONFIG_BLK_DEV_RAM != y due to
clean_rootfs() is only declared with CONFIG_BLK_DEV_RAM=y.
init/initramfs.c: In function 'populate_rootfs':
init/initramfs.c:659:3: error: implicit declaration of function
'clean_rootfs'; did you mean 'clean_path'?
[-Werror=implicit-function-declaration]
clean_rootfs();
^~~~~~~~~~~~
clean_path
Signed-off-by: Qian Cai <cai@lca.pw>
---
init/initramfs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/init/initramfs.c b/init/initramfs.c
index 000e88ca08b7..435a428c2af1 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -610,7 +610,11 @@ static void __init clean_rootfs(void)
ksys_close(fd);
kfree(buf);
}
-#endif
+#else
+static inline void clean_rootfs(void)
+{
+}
+#endif /* CONFIG_BLK_DEV_RAM */
#ifdef CONFIG_BLK_DEV_RAM
static void populate_initrd_image(char *err)
--
2.17.2 (Apple Git-113)
reply other threads:[~2019-03-28 1:50 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=20190328014806.36375-1-cai@lca.pw \
--to=cai@lca.pw \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rppt@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).