LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] livepatch: remove extern specifier from header files
@ 2015-02-18 14:21 Miroslav Benes
2015-02-18 14:26 ` Josh Poimboeuf
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Miroslav Benes @ 2015-02-18 14:21 UTC (permalink / raw)
To: jpoimboe, sjenning, jkosina, vojtech
Cc: masami.hiramatsu.pt, pmladek, live-patching, linux-kernel,
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.
Signed-off-by: Miroslav Benes <mbenes@suse.cz>
---
arch/x86/include/asm/livepatch.h | 4 ++--
include/linux/livepatch.h | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/livepatch.h b/arch/x86/include/asm/livepatch.h
index a455a53..2d29197 100644
--- a/arch/x86/include/asm/livepatch.h
+++ b/arch/x86/include/asm/livepatch.h
@@ -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)
{
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
index 95023fd..ee6dbb3 100644
--- a/include/linux/livepatch.h
+++ b/include/linux/livepatch.h
@@ -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 */
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] livepatch: remove extern specifier from header files
2015-02-18 14:21 [PATCH] livepatch: remove extern specifier from header files Miroslav Benes
@ 2015-02-18 14:26 ` Josh Poimboeuf
2015-02-18 15:01 ` Masami Hiramatsu
2015-02-18 19:51 ` Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Josh Poimboeuf @ 2015-02-18 14:26 UTC (permalink / raw)
To: Miroslav Benes
Cc: sjenning, jkosina, vojtech, masami.hiramatsu.pt, pmladek,
live-patching, linux-kernel
On Wed, Feb 18, 2015 at 03:21:07PM +0100, Miroslav Benes wrote:
> 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.
>
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
> arch/x86/include/asm/livepatch.h | 4 ++--
> include/linux/livepatch.h | 8 ++++----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/include/asm/livepatch.h b/arch/x86/include/asm/livepatch.h
> index a455a53..2d29197 100644
> --- a/arch/x86/include/asm/livepatch.h
> +++ b/arch/x86/include/asm/livepatch.h
> @@ -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)
> {
> diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
> index 95023fd..ee6dbb3 100644
> --- a/include/linux/livepatch.h
> +++ b/include/linux/livepatch.h
> @@ -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 */
>
> --
> 2.1.4
>
--
Josh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] livepatch: remove extern specifier from header files
2015-02-18 14:21 [PATCH] livepatch: remove extern specifier from header files Miroslav Benes
2015-02-18 14:26 ` Josh Poimboeuf
@ 2015-02-18 15:01 ` Masami Hiramatsu
2015-02-18 19:51 ` Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2015-02-18 15:01 UTC (permalink / raw)
To: Miroslav Benes
Cc: jpoimboe, sjenning, jkosina, vojtech, pmladek, live-patching,
linux-kernel
(2015/02/18 23:21), Miroslav Benes wrote:
> 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.
>
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>
Looks good to me.
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> ---
> arch/x86/include/asm/livepatch.h | 4 ++--
> include/linux/livepatch.h | 8 ++++----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/include/asm/livepatch.h b/arch/x86/include/asm/livepatch.h
> index a455a53..2d29197 100644
> --- a/arch/x86/include/asm/livepatch.h
> +++ b/arch/x86/include/asm/livepatch.h
> @@ -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)
> {
> diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
> index 95023fd..ee6dbb3 100644
> --- a/include/linux/livepatch.h
> +++ b/include/linux/livepatch.h
> @@ -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 */
>
>
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] livepatch: remove extern specifier from header files
2015-02-18 14:21 [PATCH] livepatch: remove extern specifier from header files Miroslav Benes
2015-02-18 14:26 ` Josh Poimboeuf
2015-02-18 15:01 ` Masami Hiramatsu
@ 2015-02-18 19:51 ` Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2015-02-18 19:51 UTC (permalink / raw)
To: Miroslav Benes
Cc: jpoimboe, sjenning, Vojtech Pavlik, masami.hiramatsu.pt, pmladek,
live-patching, linux-kernel
On Wed, 18 Feb 2015, Miroslav Benes wrote:
> 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.
>
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>
Applied, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-18 19:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 14:21 [PATCH] livepatch: remove extern specifier from header files Miroslav Benes
2015-02-18 14:26 ` Josh Poimboeuf
2015-02-18 15:01 ` Masami Hiramatsu
2015-02-18 19:51 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).