* [PATCH] bootconfig: init: make xbc_namebuf static
@ 2020-09-15 7:03 Jason Yan
2020-09-15 7:24 ` Masami Hiramatsu
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-09-15 7:03 UTC (permalink / raw)
To: mhiramat, rostedt, linux-kernel; +Cc: Jason Yan, Hulk Robot
This eliminates the following sparse warning:
init/main.c:306:6: warning: symbol 'xbc_namebuf' was not declared.
Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
init/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/main.c b/init/main.c
index 92773a5daf8d..5ac07eb4a300 100644
--- a/init/main.c
+++ b/init/main.c
@@ -303,7 +303,7 @@ static void * __init get_boot_config_from_initrd(u32 *_size, u32 *_csum)
#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)
--
2.25.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bootconfig: init: make xbc_namebuf static
2020-09-15 7:03 [PATCH] bootconfig: init: make xbc_namebuf static Jason Yan
@ 2020-09-15 7:24 ` Masami Hiramatsu
0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2020-09-15 7:24 UTC (permalink / raw)
To: Jason Yan; +Cc: rostedt, linux-kernel, Hulk Robot
On Tue, 15 Sep 2020 15:03:24 +0800
Jason Yan <yanaijie@huawei.com> wrote:
> This eliminates the following sparse warning:
>
> init/main.c:306:6: warning: symbol 'xbc_namebuf' was not declared.
> Should it be static?
Yes, this looks good to me.
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thank you!
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
> init/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/init/main.c b/init/main.c
> index 92773a5daf8d..5ac07eb4a300 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -303,7 +303,7 @@ static void * __init get_boot_config_from_initrd(u32 *_size, u32 *_csum)
>
> #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)
>
> --
> 2.25.4
>
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-15 7:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15 7:03 [PATCH] bootconfig: init: make xbc_namebuf static Jason Yan
2020-09-15 7:24 ` 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.