All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] kexec: fix warnig of crash_zero_bytes in crash.c
@ 2019-06-22 22:24 Tiezhu Yang
  2019-06-24  1:35 ` Dave Young
  0 siblings, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2019-06-22 22:24 UTC (permalink / raw)
  To: tglx, mingo, bp, hpa; +Cc: x86, linux-kernel, vgoyal

Fix the following sparse warning:

arch/x86/kernel/crash.c:59:15:
warning: symbol 'crash_zero_bytes' was not declared. Should it be static?

First, make crash_zero_bytes static. In addition, crash_zero_bytes
is used when CONFIG_KEXEC_FILE is set, so make it only available
under CONFIG_KEXEC_FILE. Otherwise, if CONFIG_KEXEC_FILE is not set,
the following warning will appear when make crash_zero_bytes static:

arch/x86/kernel/crash.c:59:22:
warning: ‘crash_zero_bytes’ defined but not used [-Wunused-variable]

Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")
Signed-off-by: Tiezhu Yang <kernelpatch@126.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
---
 arch/x86/kernel/crash.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 576b2e1..f13480e 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -56,7 +56,9 @@ struct crash_memmap_data {
  */
 crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss = NULL;
 EXPORT_SYMBOL_GPL(crash_vmclear_loaded_vmcss);
-unsigned long crash_zero_bytes;
+#ifdef CONFIG_KEXEC_FILE
+static unsigned long crash_zero_bytes;
+#endif
 
 static inline void cpu_crash_vmclear_loaded_vmcss(void)
 {
-- 
1.8.3.1

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

* Re: [PATCH v2] kexec: fix warnig of crash_zero_bytes in crash.c
  2019-06-22 22:24 [PATCH v2] kexec: fix warnig of crash_zero_bytes in crash.c Tiezhu Yang
@ 2019-06-24  1:35 ` Dave Young
  2019-06-24  1:53   ` Dave Young
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Young @ 2019-06-24  1:35 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: tglx, mingo, bp, hpa, x86, linux-kernel, vgoyal

On 06/23/19 at 06:24am, Tiezhu Yang wrote:
> Fix the following sparse warning:
> 
> arch/x86/kernel/crash.c:59:15:
> warning: symbol 'crash_zero_bytes' was not declared. Should it be static?
> 
> First, make crash_zero_bytes static. In addition, crash_zero_bytes
> is used when CONFIG_KEXEC_FILE is set, so make it only available
> under CONFIG_KEXEC_FILE. Otherwise, if CONFIG_KEXEC_FILE is not set,
> the following warning will appear when make crash_zero_bytes static:
> 
> arch/x86/kernel/crash.c:59:22:
> warning: ‘crash_zero_bytes’ defined but not used [-Wunused-variable]
> 
> Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")
> Signed-off-by: Tiezhu Yang <kernelpatch@126.com>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> ---
>  arch/x86/kernel/crash.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
> index 576b2e1..f13480e 100644
> --- a/arch/x86/kernel/crash.c
> +++ b/arch/x86/kernel/crash.c
> @@ -56,7 +56,9 @@ struct crash_memmap_data {
>   */
>  crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss = NULL;
>  EXPORT_SYMBOL_GPL(crash_vmclear_loaded_vmcss);
> -unsigned long crash_zero_bytes;
> +#ifdef CONFIG_KEXEC_FILE
> +static unsigned long crash_zero_bytes;
> +#endif
>  
>  static inline void cpu_crash_vmclear_loaded_vmcss(void)
>  {
> -- 
> 1.8.3.1

Acked-by: Dave Young <dyoung@redhat.com>

Thanks
Dave


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

* Re: [PATCH v2] kexec: fix warnig of crash_zero_bytes in crash.c
  2019-06-24  1:35 ` Dave Young
@ 2019-06-24  1:53   ` Dave Young
  2019-06-24  4:26     ` Tiezhu Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Young @ 2019-06-24  1:53 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: tglx, mingo, bp, hpa, x86, linux-kernel, vgoyal

On 06/24/19 at 09:35am, Dave Young wrote:
> On 06/23/19 at 06:24am, Tiezhu Yang wrote:
> > Fix the following sparse warning:
> > 
> > arch/x86/kernel/crash.c:59:15:
> > warning: symbol 'crash_zero_bytes' was not declared. Should it be static?
> > 
> > First, make crash_zero_bytes static. In addition, crash_zero_bytes
> > is used when CONFIG_KEXEC_FILE is set, so make it only available
> > under CONFIG_KEXEC_FILE. Otherwise, if CONFIG_KEXEC_FILE is not set,
> > the following warning will appear when make crash_zero_bytes static:
> > 
> > arch/x86/kernel/crash.c:59:22:
> > warning: ‘crash_zero_bytes’ defined but not used [-Wunused-variable]
> > 
> > Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")
> > Signed-off-by: Tiezhu Yang <kernelpatch@126.com>
> > Cc: Vivek Goyal <vgoyal@redhat.com>
> > ---
> >  arch/x86/kernel/crash.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
> > index 576b2e1..f13480e 100644
> > --- a/arch/x86/kernel/crash.c
> > +++ b/arch/x86/kernel/crash.c
> > @@ -56,7 +56,9 @@ struct crash_memmap_data {
> >   */
> >  crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss = NULL;
> >  EXPORT_SYMBOL_GPL(crash_vmclear_loaded_vmcss);
> > -unsigned long crash_zero_bytes;
> > +#ifdef CONFIG_KEXEC_FILE
> > +static unsigned long crash_zero_bytes;
> > +#endif
> >  
> >  static inline void cpu_crash_vmclear_loaded_vmcss(void)
> >  {
> > -- 
> > 1.8.3.1
> 
> Acked-by: Dave Young <dyoung@redhat.com>

BTW, a soft reminder, for kexec patches, it would be better to cc kexec mail
list.

> 
> Thanks
> Dave
> 

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

* Re:Re: [PATCH v2] kexec: fix warnig of crash_zero_bytes in crash.c
  2019-06-24  1:53   ` Dave Young
@ 2019-06-24  4:26     ` Tiezhu Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Tiezhu Yang @ 2019-06-24  4:26 UTC (permalink / raw)
  To: Dave Young; +Cc: tglx, mingo, bp, hpa, x86, linux-kernel, vgoyal

At 2019-06-24 09:53:59, "Dave Young" <dyoung@redhat.com> wrote:
>On 06/24/19 at 09:35am, Dave Young wrote:
>> On 06/23/19 at 06:24am, Tiezhu Yang wrote:
>> > Fix the following sparse warning:
>> > 
>> > arch/x86/kernel/crash.c:59:15:
>> > warning: symbol 'crash_zero_bytes' was not declared. Should it be static?
>> > 
>> > First, make crash_zero_bytes static. In addition, crash_zero_bytes
>> > is used when CONFIG_KEXEC_FILE is set, so make it only available
>> > under CONFIG_KEXEC_FILE. Otherwise, if CONFIG_KEXEC_FILE is not set,
>> > the following warning will appear when make crash_zero_bytes static:
>> > 
>> > arch/x86/kernel/crash.c:59:22:
>> > warning: ‘crash_zero_bytes’ defined but not used [-Wunused-variable]
>> > 
>> > Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")
>> > Signed-off-by: Tiezhu Yang <kernelpatch@126.com>
>> > Cc: Vivek Goyal <vgoyal@redhat.com>
>> > ---
>> >  arch/x86/kernel/crash.c | 4 +++-
>> >  1 file changed, 3 insertions(+), 1 deletion(-)
>> > 
>> > diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
>> > index 576b2e1..f13480e 100644
>> > --- a/arch/x86/kernel/crash.c
>> > +++ b/arch/x86/kernel/crash.c
>> > @@ -56,7 +56,9 @@ struct crash_memmap_data {
>> >   */
>> >  crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss = NULL;
>> >  EXPORT_SYMBOL_GPL(crash_vmclear_loaded_vmcss);
>> > -unsigned long crash_zero_bytes;
>> > +#ifdef CONFIG_KEXEC_FILE
>> > +static unsigned long crash_zero_bytes;
>> > +#endif
>> >  
>> >  static inline void cpu_crash_vmclear_loaded_vmcss(void)
>> >  {
>> > -- 
>> > 1.8.3.1
>> 
>> Acked-by: Dave Young <dyoung@redhat.com>
>
>BTW, a soft reminder, for kexec patches, it would be better to cc kexec mail
>list.

Thank you for reminding me of that, I will resend it with a Cc to kexec@lists.infradead.org.

Thanks,

>
>> 
>> Thanks
>> Dave
>> 

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

end of thread, other threads:[~2019-06-24  4:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-22 22:24 [PATCH v2] kexec: fix warnig of crash_zero_bytes in crash.c Tiezhu Yang
2019-06-24  1:35 ` Dave Young
2019-06-24  1:53   ` Dave Young
2019-06-24  4:26     ` Tiezhu Yang

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.