Skip to content

Commit 66ac1a4

Browse files
chenhuacaiakpm00
authored andcommitted
init: fix build warnings about export.h
After commit a934a57 ("scripts/misc-check: check missing #include <linux/export.h> when W=1") and 7d95680 ("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: a934a57 ("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]>
1 parent 02fb365 commit 66ac1a4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

init/initramfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/init.h>
33
#include <linux/async.h>
4+
#include <linux/export.h>
45
#include <linux/fs.h>
56
#include <linux/slab.h>
67
#include <linux/types.h>

init/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define DEBUG /* Enable initcall_debug */
1414

1515
#include <linux/types.h>
16+
#include <linux/export.h>
1617
#include <linux/extable.h>
1718
#include <linux/module.h>
1819
#include <linux/proc_fs.h>

0 commit comments

Comments
 (0)