linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] do not export show_fiq_list
@ 2019-10-18 10:35 Ben Dooks (Codethink)
  2019-10-18 10:44 ` Ben Dooks
  2019-10-18 11:17 ` Russell King - ARM Linux admin
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Dooks (Codethink) @ 2019-10-18 10:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ben Dooks (Codethink), Russell King, linux-arm-kernel

The show_fiq_list() is not used outside the file it is
defined in, so make it static and remove the header
file declaration (which it did not include) to remove
the following sparse warning:

arch/arm/kernel/fiq.c:85:5: warning: symbol 'show_fiq_list' was not declared. Should it be static?

Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
---
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
---
 arch/arm/include/asm/mach/irq.h | 1 -
 arch/arm/kernel/fiq.c           | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index dfe832a3bfc7..fcc5667c7cea 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -15,7 +15,6 @@ struct seq_file;
  * This is internal.  Do not use it.
  */
 extern void init_FIQ(int);
-extern int show_fiq_list(struct seq_file *, int);
 
 /*
  * This is for easy migration, but should be changed in the source
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
index cd1234c103fc..693d0b35acc4 100644
--- a/arch/arm/kernel/fiq.c
+++ b/arch/arm/kernel/fiq.c
@@ -82,7 +82,7 @@ static struct fiq_handler default_owner = {
 
 static struct fiq_handler *current_fiq = &default_owner;
 
-int show_fiq_list(struct seq_file *p, int prec)
+static int show_fiq_list(struct seq_file *p, int prec)
 {
 	if (current_fiq != &default_owner)
 		seq_printf(p, "%*s:              %s\n", prec, "FIQ",
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] do not export show_fiq_list
  2019-10-18 10:35 [PATCH] do not export show_fiq_list Ben Dooks (Codethink)
@ 2019-10-18 10:44 ` Ben Dooks
  2019-10-18 11:17 ` Russell King - ARM Linux admin
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2019-10-18 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Russell King, linux-arm-kernel

On 18/10/2019 11:35, Ben Dooks (Codethink) wrote:
> The show_fiq_list() is not used outside the file it is
> defined in, so make it static and remove the header
> file declaration (which it did not include) to remove
> the following sparse warning:
> 
> arch/arm/kernel/fiq.c:85:5: warning: symbol 'show_fiq_list' was not declared. Should it be static?
> 
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>

Ignore, this is I clearly can't tell the difference between fiq.c and irq.c


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] do not export show_fiq_list
  2019-10-18 10:35 [PATCH] do not export show_fiq_list Ben Dooks (Codethink)
  2019-10-18 10:44 ` Ben Dooks
@ 2019-10-18 11:17 ` Russell King - ARM Linux admin
  2019-10-18 11:20   ` Ben Dooks
  1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux admin @ 2019-10-18 11:17 UTC (permalink / raw)
  To: Ben Dooks (Codethink); +Cc: linux-kernel, linux-arm-kernel

On Fri, Oct 18, 2019 at 11:35:13AM +0100, Ben Dooks (Codethink) wrote:
> The show_fiq_list() is not used outside the file it is
> defined in, so make it static and remove the header
> file declaration (which it did not include) to remove
> the following sparse warning:
> 
> arch/arm/kernel/fiq.c:85:5: warning: symbol 'show_fiq_list' was not declared. Should it be static?

NAK.  This is called from arch/arm/kernel/irq.c; making it static will
create a link failure.

Please don't take sparse "suggestions" as the correct solution, always
research the warning thoroughly before coming up with a solution.  In
this case:

$ grep -r show_fiq_list arch/arm

would have shown why this change is wrong.

Thanks.

> 
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
> ---
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>  arch/arm/include/asm/mach/irq.h | 1 -
>  arch/arm/kernel/fiq.c           | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
> index dfe832a3bfc7..fcc5667c7cea 100644
> --- a/arch/arm/include/asm/mach/irq.h
> +++ b/arch/arm/include/asm/mach/irq.h
> @@ -15,7 +15,6 @@ struct seq_file;
>   * This is internal.  Do not use it.
>   */
>  extern void init_FIQ(int);
> -extern int show_fiq_list(struct seq_file *, int);
>  
>  /*
>   * This is for easy migration, but should be changed in the source
> diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
> index cd1234c103fc..693d0b35acc4 100644
> --- a/arch/arm/kernel/fiq.c
> +++ b/arch/arm/kernel/fiq.c
> @@ -82,7 +82,7 @@ static struct fiq_handler default_owner = {
>  
>  static struct fiq_handler *current_fiq = &default_owner;
>  
> -int show_fiq_list(struct seq_file *p, int prec)
> +static int show_fiq_list(struct seq_file *p, int prec)
>  {
>  	if (current_fiq != &default_owner)
>  		seq_printf(p, "%*s:              %s\n", prec, "FIQ",
> -- 
> 2.23.0
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] do not export show_fiq_list
  2019-10-18 11:17 ` Russell King - ARM Linux admin
@ 2019-10-18 11:20   ` Ben Dooks
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2019-10-18 11:20 UTC (permalink / raw)
  To: Russell King - ARM Linux admin; +Cc: linux-kernel, linux-arm-kernel

On 18/10/2019 12:17, Russell King - ARM Linux admin wrote:
> On Fri, Oct 18, 2019 at 11:35:13AM +0100, Ben Dooks (Codethink) wrote:
>> The show_fiq_list() is not used outside the file it is
>> defined in, so make it static and remove the header
>> file declaration (which it did not include) to remove
>> the following sparse warning:
>>
>> arch/arm/kernel/fiq.c:85:5: warning: symbol 'show_fiq_list' was not declared. Should it be static?
> 
> NAK.  This is called from arch/arm/kernel/irq.c; making it static will
> create a link failure.
> 
> Please don't take sparse "suggestions" as the correct solution, always
> research the warning thoroughly before coming up with a solution.  In
> this case:
> 
> $ grep -r show_fiq_list arch/arm
> 
> would have shown why this change is wrong.

yes, failed to see irq.c was != to fiq.c


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-10-18 11:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 10:35 [PATCH] do not export show_fiq_list Ben Dooks (Codethink)
2019-10-18 10:44 ` Ben Dooks
2019-10-18 11:17 ` Russell King - ARM Linux admin
2019-10-18 11:20   ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).