Skip to contentSkip to conversation

livepatch: remove extern specifier from header files

PATCH Applied Miroslav Benes 4 participants 4 messages Feb 18, 2015

Subsystems (2)
lore
Share & tools
lore

Miroslav Benes

author maintainer
#0 lore raw

PATCH 1/1 livepatch: remove extern specifier from header files

Storage-class specifier 'extern' is redundant in front of the function declaration. According to the C specification it has the same meaning as if not present at all. So remove it.

---
 arch/x86/include/asm/livepatch.h | 4 ++--
 include/linux/livepatch.h        | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/x86/include/asm/livepatch.h +2 -2
index a455a53..2d29197 100644
@@ -32,8 +32,8 @@ static inline int klp_check_compiler_support(void)
 #endif
 	return 0;
 }
-extern int klp_write_module_reloc(struct module *mod, unsigned long type,
-				  unsigned long loc, unsigned long value);
+int klp_write_module_reloc(struct module *mod, unsigned long type,
+			   unsigned long loc, unsigned long value);
 
 static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
 {
include/linux/livepatch.h +4 -4
index 95023fd..ee6dbb3 100644
@@ -123,10 +123,10 @@ struct klp_patch {
 	enum klp_state state;
 };
 
-extern int klp_register_patch(struct klp_patch *);
-extern int klp_unregister_patch(struct klp_patch *);
-extern int klp_enable_patch(struct klp_patch *);
-extern int klp_disable_patch(struct klp_patch *);
+int klp_register_patch(struct klp_patch *);
+int klp_unregister_patch(struct klp_patch *);
+int klp_enable_patch(struct klp_patch *);
+int klp_disable_patch(struct klp_patch *);
 
 #endif /* CONFIG_LIVEPATCH */
 
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Miroslav Benes

Storage-class specifier 'extern' is redundant in front of the function declaration. According to the C specification it has the same meaning as if not present at all. So remove it.

Quoted 42 lines
---
 arch/x86/include/asm/livepatch.h | 4 ++--
 include/linux/livepatch.h        | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/x86/include/asm/livepatch.h +2 -2
index a455a53..2d29197 100644
@@ -32,8 +32,8 @@ static inline int klp_check_compiler_support(void)
 #endif
 	return 0;
 }
-extern int klp_write_module_reloc(struct module *mod, unsigned long type,
-				  unsigned long loc, unsigned long value);
+int klp_write_module_reloc(struct module *mod, unsigned long type,
+			   unsigned long loc, unsigned long value);
 
 static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
 {
include/linux/livepatch.h +4 -4
index 95023fd..ee6dbb3 100644
@@ -123,10 +123,10 @@ struct klp_patch {
 	enum klp_state state;
 };
 
-extern int klp_register_patch(struct klp_patch *);
-extern int klp_unregister_patch(struct klp_patch *);
-extern int klp_enable_patch(struct klp_patch *);
-extern int klp_disable_patch(struct klp_patch *);
+int klp_register_patch(struct klp_patch *);
+int klp_unregister_patch(struct klp_patch *);
+int klp_enable_patch(struct klp_patch *);
+int klp_disable_patch(struct klp_patch *);
 
 #endif /* CONFIG_LIVEPATCH */
 
Signature · 1 line
2.1.4
Signature · 1 line
Josh
Reviewed-by on v1 1/1
#2 lore raw
In reply to Miroslav Benes
Quoted 5 lines · Miroslav Benes

Storage-class specifier 'extern' is redundant in front of the function declaration. According to the C specification it has the same meaning as if not present at all. So remove it.

Looks good to me.

Quoted 40 lines
---
 arch/x86/include/asm/livepatch.h | 4 ++--
 include/linux/livepatch.h        | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/x86/include/asm/livepatch.h +2 -2
index a455a53..2d29197 100644
@@ -32,8 +32,8 @@ static inline int klp_check_compiler_support(void)
 #endif
 	return 0;
 }
-extern int klp_write_module_reloc(struct module *mod, unsigned long type,
-				  unsigned long loc, unsigned long value);
+int klp_write_module_reloc(struct module *mod, unsigned long type,
+			   unsigned long loc, unsigned long value);
 
 static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
 {
include/linux/livepatch.h +4 -4
index 95023fd..ee6dbb3 100644
@@ -123,10 +123,10 @@ struct klp_patch {
 	enum klp_state state;
 };
 
-extern int klp_register_patch(struct klp_patch *);
-extern int klp_unregister_patch(struct klp_patch *);
-extern int klp_enable_patch(struct klp_patch *);
-extern int klp_disable_patch(struct klp_patch *);
+int klp_register_patch(struct klp_patch *);
+int klp_unregister_patch(struct klp_patch *);
+int klp_enable_patch(struct klp_patch *);
+int klp_disable_patch(struct klp_patch *);
 
 #endif /* CONFIG_LIVEPATCH */
 
Signature · 4 lines
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: [email protected]