* [PATCH next] init/main.c: make some symbols static
@ 2020-01-15 13:54 Chen Zhou
2020-01-15 14:20 ` Mike Rapoport
0 siblings, 1 reply; 3+ messages in thread
From: Chen Zhou @ 2020-01-15 13:54 UTC (permalink / raw)
To: akpm, sfr, rppt, keescook; +Cc: linux-kernel, chenzhou10
Make variable xbc_namebuf and function boot_config_checksum static to
fix build warnings, warnings are as follows:
init/main.c:254:6:
warning: symbol 'xbc_namebuf' was not declared. Should it be static?
init/main.c:330:5:
warning: symbol 'boot_config_checksum' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
init/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/init/main.c b/init/main.c
index a77114f..3a95591 100644
--- a/init/main.c
+++ b/init/main.c
@@ -251,7 +251,7 @@ early_param("loglevel", loglevel);
#ifdef CONFIG_BOOT_CONFIG
-char xbc_namebuf[XBC_KEYLEN_MAX] __initdata;
+static char xbc_namebuf[XBC_KEYLEN_MAX] __initdata;
#define rest(dst, end) ((end) > (dst) ? (end) - (dst) : 0)
@@ -327,7 +327,7 @@ static char * __init xbc_make_cmdline(const char *key)
return new_cmdline;
}
-u32 boot_config_checksum(unsigned char *p, u32 size)
+static u32 boot_config_checksum(unsigned char *p, u32 size)
{
u32 ret = 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH next] init/main.c: make some symbols static
2020-01-15 13:54 [PATCH next] init/main.c: make some symbols static Chen Zhou
@ 2020-01-15 14:20 ` Mike Rapoport
2020-01-15 22:20 ` Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: Mike Rapoport @ 2020-01-15 14:20 UTC (permalink / raw)
To: Chen Zhou
Cc: Steven Rostedt, Masami Hiramatsu, akpm, sfr, keescook, linux-kernel
(added Steven and Masami)
On Wed, Jan 15, 2020 at 09:54:58PM +0800, Chen Zhou wrote:
> Make variable xbc_namebuf and function boot_config_checksum static to
> fix build warnings, warnings are as follows:
>
> init/main.c:254:6:
> warning: symbol 'xbc_namebuf' was not declared. Should it be static?
> init/main.c:330:5:
> warning: symbol 'boot_config_checksum' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
> ---
> init/main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/init/main.c b/init/main.c
> index a77114f..3a95591 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -251,7 +251,7 @@ early_param("loglevel", loglevel);
>
> #ifdef CONFIG_BOOT_CONFIG
>
> -char xbc_namebuf[XBC_KEYLEN_MAX] __initdata;
> +static char xbc_namebuf[XBC_KEYLEN_MAX] __initdata;
>
> #define rest(dst, end) ((end) > (dst) ? (end) - (dst) : 0)
>
> @@ -327,7 +327,7 @@ static char * __init xbc_make_cmdline(const char *key)
> return new_cmdline;
> }
>
> -u32 boot_config_checksum(unsigned char *p, u32 size)
> +static u32 boot_config_checksum(unsigned char *p, u32 size)
> {
> u32 ret = 0;
>
> --
> 2.7.4
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH next] init/main.c: make some symbols static
2020-01-15 14:20 ` Mike Rapoport
@ 2020-01-15 22:20 ` Masami Hiramatsu
0 siblings, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2020-01-15 22:20 UTC (permalink / raw)
To: Mike Rapoport
Cc: Chen Zhou, Steven Rostedt, Masami Hiramatsu, akpm, sfr, keescook,
linux-kernel
Hi Chen Hulk and Mike,
Thanks for reporting.
This looks good to me.
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thank you!
On Wed, 15 Jan 2020 16:20:58 +0200
Mike Rapoport <rppt@linux.ibm.com> wrote:
> (added Steven and Masami)
>
> On Wed, Jan 15, 2020 at 09:54:58PM +0800, Chen Zhou wrote:
> > Make variable xbc_namebuf and function boot_config_checksum static to
> > fix build warnings, warnings are as follows:
> >
> > init/main.c:254:6:
> > warning: symbol 'xbc_namebuf' was not declared. Should it be static?
> > init/main.c:330:5:
> > warning: symbol 'boot_config_checksum' was not declared. Should it be static?
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
> > ---
> > init/main.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/init/main.c b/init/main.c
> > index a77114f..3a95591 100644
> > --- a/init/main.c
> > +++ b/init/main.c
> > @@ -251,7 +251,7 @@ early_param("loglevel", loglevel);
> >
> > #ifdef CONFIG_BOOT_CONFIG
> >
> > -char xbc_namebuf[XBC_KEYLEN_MAX] __initdata;
> > +static char xbc_namebuf[XBC_KEYLEN_MAX] __initdata;
> >
> > #define rest(dst, end) ((end) > (dst) ? (end) - (dst) : 0)
> >
> > @@ -327,7 +327,7 @@ static char * __init xbc_make_cmdline(const char *key)
> > return new_cmdline;
> > }
> >
> > -u32 boot_config_checksum(unsigned char *p, u32 size)
> > +static u32 boot_config_checksum(unsigned char *p, u32 size)
> > {
> > u32 ret = 0;
> >
> > --
> > 2.7.4
> >
>
> --
> Sincerely yours,
> Mike.
>
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-15 22:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 13:54 [PATCH next] init/main.c: make some symbols static Chen Zhou
2020-01-15 14:20 ` Mike Rapoport
2020-01-15 22:20 ` Masami Hiramatsu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.