diff mbox series

[1/2] module: stats: include uapi/linux/module.h

Message ID 20230417220254.3215576-1-arnd@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/2] module: stats: include uapi/linux/module.h | expand

Commit Message

Arnd Bergmann April 17, 2023, 10:02 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

MODULE_INIT_COMPRESSED_FILE is defined in the uapi header, which
is not included indirectly from the normal linux/module.h, but
has to be pulled in explicitly:

kernel/module/stats.c: In function 'mod_stat_bump_invalid':
kernel/module/stats.c:227:14: error: 'MODULE_INIT_COMPRESSED_FILE' undeclared (first use in this function)
  227 |  if (flags & MODULE_INIT_COMPRESSED_FILE)
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/module/stats.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Luis Chamberlain April 17, 2023, 11:31 p.m. UTC | #1
On Tue, Apr 18, 2023 at 12:02:46AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> MODULE_INIT_COMPRESSED_FILE is defined in the uapi header, which
> is not included indirectly from the normal linux/module.h, but
> has to be pulled in explicitly:
> 
> kernel/module/stats.c: In function 'mod_stat_bump_invalid':
> kernel/module/stats.c:227:14: error: 'MODULE_INIT_COMPRESSED_FILE' undeclared (first use in this function)
>   227 |  if (flags & MODULE_INIT_COMPRESSED_FILE)
>       |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied this 1/2 patch and pushed, thanks!

  Luis
diff mbox series

Patch

diff --git a/kernel/module/stats.c b/kernel/module/stats.c
index d9b9bccf4256..bbf90190a3fe 100644
--- a/kernel/module/stats.c
+++ b/kernel/module/stats.c
@@ -6,6 +6,7 @@ 
  */
 
 #include <linux/module.h>
+#include <uapi/linux/module.h>
 #include <linux/string.h>
 #include <linux/printk.h>
 #include <linux/slab.h>