From 7b73305160f11b633e9801b2c6b83d5b0cb867cc Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 16 Dec 2016 18:45:21 +0100 Subject: module: Drop redundant declaration of struct module Struct module is already declared at the beginning of the file, no need to declare it again. Signed-off-by: Jean Delvare Fixes: 93c2e105f6bc ("module: Optimize __module_address() using a latched RB-tree") Cc: Peter Zijlstra (Intel) Cc: Jessica Yu Cc: Rusty Russell Signed-off-by: Jessica Yu --- include/linux/module.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux/module.h') diff --git a/include/linux/module.h b/include/linux/module.h index 7c84273d60b9..ef599379f9a4 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -282,8 +282,6 @@ enum module_state { MODULE_STATE_UNFORMED, /* Still setting it up. */ }; -struct module; - struct mod_tree_node { struct module *mod; struct latch_tree_node node; -- cgit From 1f318a8bafcfba9f0d623f4870c4e890fd22e659 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 1 Feb 2017 18:00:14 +0100 Subject: modules: mark __inittest/__exittest as __maybe_unused clang warns about unused inline functions by default: arch/arm/crypto/aes-cipher-glue.c:68:1: warning: unused function '__inittest' [-Wunused-function] arch/arm/crypto/aes-cipher-glue.c:69:1: warning: unused function '__exittest' [-Wunused-function] As these appear in every single module, let's just disable the warnings by marking the two functions as __maybe_unused. Signed-off-by: Arnd Bergmann Reviewed-by: Miroslav Benes Acked-by: Rusty Russell Signed-off-by: Jessica Yu --- include/linux/module.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux/module.h') diff --git a/include/linux/module.h b/include/linux/module.h index ef599379f9a4..4e09f469bd7d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -127,13 +127,13 @@ extern void cleanup_module(void); /* Each module must use one module_init(). */ #define module_init(initfn) \ - static inline initcall_t __inittest(void) \ + static inline initcall_t __maybe_unused __inittest(void) \ { return initfn; } \ int init_module(void) __attribute__((alias(#initfn))); /* This is only required if you want to be unloadable. */ #define module_exit(exitfn) \ - static inline exitcall_t __exittest(void) \ + static inline exitcall_t __maybe_unused __exittest(void) \ { return exitfn; } \ void cleanup_module(void) __attribute__((alias(#exitfn))); -- cgit