Skip to contentSkip to conversation

do not export show_fiq_list

PATCH In review Ben Dooks (Codethink) 2 participants 4 messages Oct 18, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do not export show_fiq_list

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?

---
Cc: Russell King <[email protected]>
Cc: [email protected]

---
 arch/arm/include/asm/mach/irq.h | 1 -
 arch/arm/kernel/fiq.c           | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/include/asm/mach/irq.h +0 -1
index dfe832a3bfc7..fcc5667c7cea 100644
@@ -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
arch/arm/kernel/fiq.c +1 -1
index cd1234c103fc..693d0b35acc4 100644
@@ -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",
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#1 lore raw
Quoted 8 lines · Ben Dooks (Codethink)

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?

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

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

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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw
In reply to Ben Dooks (Codethink)
Quoted 6 lines · Ben Dooks (Codethink)

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.

Quoted 39 lines

---
Cc: Russell King <[email protected]>
Cc: [email protected]

---
 arch/arm/include/asm/mach/irq.h | 1 -
 arch/arm/kernel/fiq.c           | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/include/asm/mach/irq.h +0 -1
index dfe832a3bfc7..fcc5667c7cea 100644
@@ -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
arch/arm/kernel/fiq.c +1 -1
index cd1234c103fc..693d0b35acc4 100644
@@ -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",
Signature · 1 line
2.23.0
Signature · 8 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#3 lore raw
Quoted 11 lines · Russell King - ARM Linux admin
Quoted 6 lines · Ben Dooks (Codethink)

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.

Quoted 7 lines

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

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

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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel