All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-next] init/main.c: make local symbol static
@ 2018-01-18 22:06 ` Christopher Díaz Riveros
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Díaz Riveros @ 2018-01-18 22:06 UTC (permalink / raw)
  To: mingo, akpm, tglx, keescook, lauraa, rostedt, mhocko,
	thomas.lendacky, tal.shorer, viresh.kumar, lokeshvutla
  Cc: Christopher Díaz Riveros, linux-kernel, kernel-janitors

Fixes the following sparse warning:

init/main.c:167:12: warning:
  symbol 'envp_init' was not declared. Should it be static?

Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
---
 init/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/main.c b/init/main.c
index a8100b954839..ae86addb306c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -164,7 +164,7 @@ static int __init set_reset_devices(char *str)
 __setup("reset_devices", set_reset_devices);
 
 static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
-const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
+static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
 static const char *panic_later, *panic_param;
 
 extern const struct obs_kernel_param __setup_start[], __setup_end[];
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH-next] init/main.c: make local symbol static
@ 2018-01-18 22:06 ` Christopher Díaz Riveros
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Díaz Riveros @ 2018-01-18 22:06 UTC (permalink / raw)
  To: mingo, akpm, tglx, keescook, lauraa, rostedt, mhocko,
	thomas.lendacky, tal.shorer, viresh.kumar, lokeshvutla
  Cc: Christopher Díaz Riveros, linux-kernel, kernel-janitors

Fixes the following sparse warning:

init/main.c:167:12: warning:
  symbol 'envp_init' was not declared. Should it be static?

Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
---
 init/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/main.c b/init/main.c
index a8100b954839..ae86addb306c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -164,7 +164,7 @@ static int __init set_reset_devices(char *str)
 __setup("reset_devices", set_reset_devices);
 
 static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
-const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
+static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
 static const char *panic_later, *panic_param;
 
 extern const struct obs_kernel_param __setup_start[], __setup_end[];
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
  2018-01-18 22:06 ` Christopher Díaz Riveros
@ 2018-01-18 22:09   ` Randy Dunlap
  -1 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2018-01-18 22:09 UTC (permalink / raw)
  To: Christopher Díaz Riveros, mingo, akpm, tglx, keescook,
	lauraa, rostedt, mhocko, thomas.lendacky, tal.shorer,
	viresh.kumar, lokeshvutla
  Cc: linux-kernel, kernel-janitors

On 01/18/2018 02:06 PM, Christopher Díaz Riveros wrote:
> Fixes the following sparse warning:
> 
> init/main.c:167:12: warning:
>   symbol 'envp_init' was not declared. Should it be static?
> 
> Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>

Does the kernel build OK after this change?

What about the other user(s) of envp_init?


> ---
>  init/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/main.c b/init/main.c
> index a8100b954839..ae86addb306c 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -164,7 +164,7 @@ static int __init set_reset_devices(char *str)
>  __setup("reset_devices", set_reset_devices);
>  
>  static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
> -const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
> +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
>  static const char *panic_later, *panic_param;
>  
>  extern const struct obs_kernel_param __setup_start[], __setup_end[];
> 


-- 
~Randy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
@ 2018-01-18 22:09   ` Randy Dunlap
  0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2018-01-18 22:09 UTC (permalink / raw)
  To: Christopher Díaz Riveros, mingo, akpm, tglx, keescook,
	lauraa, rostedt, mhocko, thomas.lendacky, tal.shorer,
	viresh.kumar, lokeshvutla
  Cc: linux-kernel, kernel-janitors

On 01/18/2018 02:06 PM, Christopher Díaz Riveros wrote:
> Fixes the following sparse warning:
> 
> init/main.c:167:12: warning:
>   symbol 'envp_init' was not declared. Should it be static?
> 
> Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>

Does the kernel build OK after this change?

What about the other user(s) of envp_init?


> ---
>  init/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/main.c b/init/main.c
> index a8100b954839..ae86addb306c 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -164,7 +164,7 @@ static int __init set_reset_devices(char *str)
>  __setup("reset_devices", set_reset_devices);
>  
>  static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
> -const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
> +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
>  static const char *panic_later, *panic_param;
>  
>  extern const struct obs_kernel_param __setup_start[], __setup_end[];
> 


-- 
~Randy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
  2018-01-18 22:09   ` Randy Dunlap
@ 2018-01-18 22:31     ` Tom Lendacky
  -1 siblings, 0 replies; 12+ messages in thread
From: Tom Lendacky @ 2018-01-18 22:31 UTC (permalink / raw)
  To: Randy Dunlap, Christopher Díaz Riveros, mingo, akpm, tglx,
	keescook, lauraa, rostedt, mhocko, tal.shorer, viresh.kumar,
	lokeshvutla
  Cc: linux-kernel, kernel-janitors

On 1/18/2018 4:09 PM, Randy Dunlap wrote:
> On 01/18/2018 02:06 PM, Christopher Díaz Riveros wrote:
>> Fixes the following sparse warning:
>>
>> init/main.c:167:12: warning:
>>   symbol 'envp_init' was not declared. Should it be static?
>>
>> Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
> 
> Does the kernel build OK after this change?
> 
> What about the other user(s) of envp_init?

It looks like it's referenced in init/do_mounts_initrd.c.  Rather
than making it static, it should be declared in .h file.

Thanks,
Tom

> 
> 
>> ---
>>  init/main.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/init/main.c b/init/main.c
>> index a8100b954839..ae86addb306c 100644
>> --- a/init/main.c
>> +++ b/init/main.c
>> @@ -164,7 +164,7 @@ static int __init set_reset_devices(char *str)
>>  __setup("reset_devices", set_reset_devices);
>>  
>>  static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
>> -const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
>> +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
>>  static const char *panic_later, *panic_param;
>>  
>>  extern const struct obs_kernel_param __setup_start[], __setup_end[];
>>
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
@ 2018-01-18 22:31     ` Tom Lendacky
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Lendacky @ 2018-01-18 22:31 UTC (permalink / raw)
  To: Randy Dunlap, Christopher Díaz Riveros, mingo, akpm, tglx,
	keescook, lauraa, rostedt, mhocko, tal.shorer, viresh.kumar,
	lokeshvutla
  Cc: linux-kernel, kernel-janitors

On 1/18/2018 4:09 PM, Randy Dunlap wrote:
> On 01/18/2018 02:06 PM, Christopher Díaz Riveros wrote:
>> Fixes the following sparse warning:
>>
>> init/main.c:167:12: warning:
>>   symbol 'envp_init' was not declared. Should it be static?
>>
>> Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
> 
> Does the kernel build OK after this change?
> 
> What about the other user(s) of envp_init?

It looks like it's referenced in init/do_mounts_initrd.c.  Rather
than making it static, it should be declared in .h file.

Thanks,
Tom

> 
> 
>> ---
>>  init/main.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/init/main.c b/init/main.c
>> index a8100b954839..ae86addb306c 100644
>> --- a/init/main.c
>> +++ b/init/main.c
>> @@ -164,7 +164,7 @@ static int __init set_reset_devices(char *str)
>>  __setup("reset_devices", set_reset_devices);
>>  
>>  static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
>> -const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
>> +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
>>  static const char *panic_later, *panic_param;
>>  
>>  extern const struct obs_kernel_param __setup_start[], __setup_end[];
>>
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
  2018-01-18 22:31     ` Tom Lendacky
@ 2018-01-18 23:33       ` Christopher Díaz Riveros
  -1 siblings, 0 replies; 12+ messages in thread
From: Christopher Díaz Riveros @ 2018-01-18 23:33 UTC (permalink / raw)
  To: Tom Lendacky, Randy Dunlap, mingo, akpm, tglx, keescook, lauraa,
	rostedt, mhocko, tal.shorer, viresh.kumar, lokeshvutla
  Cc: linux-kernel, kernel-janitors

El jue, 18-01-2018 a las 16:31 -0600, Tom Lendacky escribió:
> On 1/18/2018 4:09 PM, Randy Dunlap wrote:
> > On 01/18/2018 02:06 PM, Christopher Díaz Riveros wrote:
> > > Fixes the following sparse warning:
> > > 
> > > init/main.c:167:12: warning:
> > >   symbol 'envp_init' was not declared. Should it be static?
> > > 
> > > Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
> > 
> > Does the kernel build OK after this change?
> > 

I built it a couple of times before sending the patch, now I compiled
it again and everything went ok.

> > What about the other user(s) of envp_init?
> 
> It looks like it's referenced in init/do_mounts_initrd.c.  Rather
> than making it static, it should be declared in .h file.
> 

Ok, I'll try to figure it out, akpm accepted the patch in mm-next but
was dropped because of testing failures. I'm still very new to all of
this process.

> Thanks,
> Tom
> 

Thank you both.
> > 
> > 
> > > ---
> > >  init/main.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/init/main.c b/init/main.c
> > > index a8100b954839..ae86addb306c 100644
> > > --- a/init/main.c
> > > +++ b/init/main.c
> > > @@ -164,7 +164,7 @@ static int __init set_reset_devices(char
> > > *str)
> > >  __setup("reset_devices", set_reset_devices);
> > >  
> > >  static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL,
> > > };
> > > -const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/",
> > > "TERM=linux", NULL, };
> > > +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/",
> > > "TERM=linux", NULL, };
> > >  static const char *panic_later, *panic_param;
> > >  
> > >  extern const struct obs_kernel_param __setup_start[],
> > > __setup_end[];
> > > 
> > 
> > 
-- 
Christopher Díaz Riveros
Gentoo Linux Developer
GPG Fingerprint: E517 5ECB 8152 98E4 FEBC  2BAA 4DBB D10F 0FDD 2547

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
@ 2018-01-18 23:33       ` Christopher Díaz Riveros
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Díaz Riveros @ 2018-01-18 23:33 UTC (permalink / raw)
  To: Tom Lendacky, Randy Dunlap, mingo, akpm, tglx, keescook, lauraa,
	rostedt, mhocko, tal.shorer, viresh.kumar, lokeshvutla
  Cc: linux-kernel, kernel-janitors

El jue, 18-01-2018 a las 16:31 -0600, Tom Lendacky escribió:
> On 1/18/2018 4:09 PM, Randy Dunlap wrote:
> > On 01/18/2018 02:06 PM, Christopher Díaz Riveros wrote:
> > > Fixes the following sparse warning:
> > > 
> > > init/main.c:167:12: warning:
> > >   symbol 'envp_init' was not declared. Should it be static?
> > > 
> > > Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
> > 
> > Does the kernel build OK after this change?
> > 

I built it a couple of times before sending the patch, now I compiled
it again and everything went ok.

> > What about the other user(s) of envp_init?
> 
> It looks like it's referenced in init/do_mounts_initrd.c.  Rather
> than making it static, it should be declared in .h file.
> 

Ok, I'll try to figure it out, akpm accepted the patch in mm-next but
was dropped because of testing failures. I'm still very new to all of
this process.

> Thanks,
> Tom
> 

Thank you both.
> > 
> > 
> > > ---
> > >  init/main.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/init/main.c b/init/main.c
> > > index a8100b954839..ae86addb306c 100644
> > > --- a/init/main.c
> > > +++ b/init/main.c
> > > @@ -164,7 +164,7 @@ static int __init set_reset_devices(char
> > > *str)
> > >  __setup("reset_devices", set_reset_devices);
> > >  
> > >  static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL,
> > > };
> > > -const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/",
> > > "TERM=linux", NULL, };
> > > +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/",
> > > "TERM=linux", NULL, };
> > >  static const char *panic_later, *panic_param;
> > >  
> > >  extern const struct obs_kernel_param __setup_start[],
> > > __setup_end[];
> > > 
> > 
> > 
-- 
Christopher Díaz Riveros
Gentoo Linux Developer
GPG Fingerprint: E517 5ECB 8152 98E4 FEBC  2BAA 4DBB D10F 0FDD 2547

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
  2018-01-18 23:33       ` Christopher Díaz Riveros
@ 2018-01-18 23:35         ` Randy Dunlap
  -1 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2018-01-18 23:35 UTC (permalink / raw)
  To: Christopher Díaz Riveros, Tom Lendacky, mingo, akpm, tglx,
	keescook, lauraa, rostedt, mhocko, tal.shorer, viresh.kumar,
	lokeshvutla
  Cc: linux-kernel, kernel-janitors

On 01/18/2018 03:33 PM, Christopher Díaz Riveros wrote:
> El jue, 18-01-2018 a las 16:31 -0600, Tom Lendacky escribió:
>> On 1/18/2018 4:09 PM, Randy Dunlap wrote:
>>> On 01/18/2018 02:06 PM, Christopher Díaz Riveros wrote:
>>>> Fixes the following sparse warning:
>>>>
>>>> init/main.c:167:12: warning:
>>>>   symbol 'envp_init' was not declared. Should it be static?
>>>>
>>>> Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
>>>
>>> Does the kernel build OK after this change?
>>>
> 
> I built it a couple of times before sending the patch, now I compiled
> it again and everything went ok.
> 
>>> What about the other user(s) of envp_init?
>>
>> It looks like it's referenced in init/do_mounts_initrd.c.  Rather
>> than making it static, it should be declared in .h file.
>>

init/Makefile should give you a clue.

> 
> Ok, I'll try to figure it out, akpm accepted the patch in mm-next but
> was dropped because of testing failures. I'm still very new to all of
> this process.


-- 
~Randy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
@ 2018-01-18 23:35         ` Randy Dunlap
  0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2018-01-18 23:35 UTC (permalink / raw)
  To: Christopher Díaz Riveros, Tom Lendacky, mingo, akpm, tglx,
	keescook, lauraa, rostedt, mhocko, tal.shorer, viresh.kumar,
	lokeshvutla
  Cc: linux-kernel, kernel-janitors

On 01/18/2018 03:33 PM, Christopher Díaz Riveros wrote:
> El jue, 18-01-2018 a las 16:31 -0600, Tom Lendacky escribió:
>> On 1/18/2018 4:09 PM, Randy Dunlap wrote:
>>> On 01/18/2018 02:06 PM, Christopher Díaz Riveros wrote:
>>>> Fixes the following sparse warning:
>>>>
>>>> init/main.c:167:12: warning:
>>>>   symbol 'envp_init' was not declared. Should it be static?
>>>>
>>>> Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
>>>
>>> Does the kernel build OK after this change?
>>>
> 
> I built it a couple of times before sending the patch, now I compiled
> it again and everything went ok.
> 
>>> What about the other user(s) of envp_init?
>>
>> It looks like it's referenced in init/do_mounts_initrd.c.  Rather
>> than making it static, it should be declared in .h file.
>>

init/Makefile should give you a clue.

> 
> Ok, I'll try to figure it out, akpm accepted the patch in mm-next but
> was dropped because of testing failures. I'm still very new to all of
> this process.


-- 
~Randy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
  2018-01-18 23:33       ` Christopher Díaz Riveros
@ 2018-01-19  0:31         ` Steven Rostedt
  -1 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2018-01-19  0:31 UTC (permalink / raw)
  To: Christopher Díaz Riveros
  Cc: Tom Lendacky, Randy Dunlap, mingo, akpm, tglx, keescook, lauraa,
	mhocko, tal.shorer, viresh.kumar, lokeshvutla, linux-kernel,
	kernel-janitors

On Thu, 18 Jan 2018 18:33:27 -0500
Christopher Díaz Riveros <chrisadr@gentoo.org> wrote:

> > > What about the other user(s) of envp_init?  
> > 
> > It looks like it's referenced in init/do_mounts_initrd.c.  Rather
> > than making it static, it should be declared in .h file.
> >   
> 
> Ok, I'll try to figure it out, akpm accepted the patch in mm-next but
> was dropped because of testing failures. I'm still very new to all of
> this process.

Yeah, because do_mounts_initrd.c didn't compile. If you do add it to a
header, use a header local in the init directory. Do not expose
envp_init to the entire kernel.

-- Steve

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH-next] init/main.c: make local symbol static
@ 2018-01-19  0:31         ` Steven Rostedt
  0 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2018-01-19  0:31 UTC (permalink / raw)
  To: Christopher Díaz Riveros
  Cc: Tom Lendacky, Randy Dunlap, mingo, akpm, tglx, keescook, lauraa,
	mhocko, tal.shorer, viresh.kumar, lokeshvutla, linux-kernel,
	kernel-janitors

On Thu, 18 Jan 2018 18:33:27 -0500
Christopher Díaz Riveros <chrisadr@gentoo.org> wrote:

> > > What about the other user(s) of envp_init?  
> > 
> > It looks like it's referenced in init/do_mounts_initrd.c.  Rather
> > than making it static, it should be declared in .h file.
> >   
> 
> Ok, I'll try to figure it out, akpm accepted the patch in mm-next but
> was dropped because of testing failures. I'm still very new to all of
> this process.

Yeah, because do_mounts_initrd.c didn't compile. If you do add it to a
header, use a header local in the init directory. Do not expose
envp_init to the entire kernel.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-01-19  0:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 22:06 [PATCH-next] init/main.c: make local symbol static Christopher Díaz Riveros
2018-01-18 22:06 ` Christopher Díaz Riveros
2018-01-18 22:09 ` Randy Dunlap
2018-01-18 22:09   ` Randy Dunlap
2018-01-18 22:31   ` Tom Lendacky
2018-01-18 22:31     ` Tom Lendacky
2018-01-18 23:33     ` Christopher Díaz Riveros
2018-01-18 23:33       ` Christopher Díaz Riveros
2018-01-18 23:35       ` Randy Dunlap
2018-01-18 23:35         ` Randy Dunlap
2018-01-19  0:31       ` Steven Rostedt
2018-01-19  0:31         ` Steven Rostedt

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.