diff options
| author | Huacai Chen <[email protected]> | 2025-06-08 14:12:35 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-06-12 05:42:36 +0000 |
| commit | 66ac1a4d366d3faa95fcf6082b555f8d77f1e8db (patch) | |
| tree | a5d49963b29f1eb45d82c66e73cc6a5b3763eee8 | |
| parent | MAINTAINERS: add Barry as a THP reviewer (diff) | |
| download | kernel-66ac1a4d366d3faa95fcf6082b555f8d77f1e8db.tar.gz kernel-66ac1a4d366d3faa95fcf6082b555f8d77f1e8db.zip | |
init: fix build warnings about export.h
After commit a934a57a42f64a4 ("scripts/misc-check: check missing #include
<linux/export.h> when W=1") and 7d95680d64ac8e836c ("scripts/misc-check:
check unnecessary #include <linux/export.h> when W=1"), we get some build
warnings with W=1:
init/main.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
init/initramfs.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
So fix these build warnings for the init code.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1")
Signed-off-by: Huacai Chen <[email protected]>
Reviewed-by: Masahiro Yamada <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Jan Kara <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
| -rw-r--r-- | init/initramfs.c | 1 | ||||
| -rw-r--r-- | init/main.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 72bad44a1d41..097673b97784 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/init.h> #include <linux/async.h> +#include <linux/export.h> #include <linux/fs.h> #include <linux/slab.h> #include <linux/types.h> diff --git a/init/main.c b/init/main.c index ed576c7f475d..225a58279acd 100644 --- a/init/main.c +++ b/init/main.c @@ -13,6 +13,7 @@ #define DEBUG /* Enable initcall_debug */ #include <linux/types.h> +#include <linux/export.h> #include <linux/extable.h> #include <linux/module.h> #include <linux/proc_fs.h> |
