* [PATCH -mmots] initramfs: fix a compilation error
@ 2019-03-28 1:48 Qian Cai
0 siblings, 0 replies; only message in thread
From: Qian Cai @ 2019-03-28 1:48 UTC (permalink / raw)
To: akpm; +Cc: hch, rppt, linux-kernel, Qian Cai
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)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-28 1:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 1:48 [PATCH -mmots] initramfs: fix a compilation error Qian Cai
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).