init/main.c: make some symbols static
PATCH 1/1 init/main.c: make some symbols static
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?
--- init/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
init/main.c +2 -2
@@ -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 ;
Signature · 1 line
2.7.4
(added Steven and Masami)
Quoted 39 lines · Chen Zhou
Make variable
xbc_namebufand functionboot_config_checksumstatic 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 <[email protected]>Signed-off-by Chen Zhou <[email protected]>--- init/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)init/main.c +2
-2@@ -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 ;Signature · 1 line
2.7.4
Signature · 2 lines
Sincerely yours, Mike.
Masami Hiramatsu
Acked-byHi Chen Hulk and Mike,
Thanks for reporting.
This looks good to me.
Thank you!
Quoted 47 lines · On Wed, 15 Jan 2020 16:20:58 +0200 Mike Rapoport <[email protected]> wrote:
(added Steven and Masami)
Quoted 39 lines · Chen Zhou
Make variable
xbc_namebufand functionboot_config_checksumstatic 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 <[email protected]>Signed-off-by Chen Zhou <[email protected]>--- init/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)init/main.c +2
-2@@ -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 ;Signature · 1 line
2.7.4Signature · 2 lines
Sincerely yours, Mike.
Signature · 1 line
Masami Hiramatsu <[email protected]>