Skip to contentSkip to conversation

firmware: bcm47xx_sprom: Fix -Wmissing-prototypes warnings

PATCH In review Florian Fainelli 2 participants 6 messages Jul 26, 2020 – Aug 17, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover firmware: bcm47xx_sprom: Fix -Wmissing-prototypes warnings

Hi Thomas,

This patch series fixes W=1 -Wmissing-prototypes warnings for the bcm47xx_sprom.c firmware file.

Thanks!

Florian Fainelli (2):
firmware: bcm47xx_sprom: Fix -Wmissing-prototypes warnings
MIPS: BCM47xx: Include bcm47xx_sprom.h

 arch/mips/include/asm/mach-bcm47xx/bcm47xx.h |  4 +---
 drivers/firmware/broadcom/bcm47xx_sprom.c    |  1 +
 include/linux/bcm47xx_sprom.h                | 10 ++++++++++
 3 files changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 firmware: bcm47xx_sprom: Fix -Wmissing-prototypes warnings

bcm47xx_sprom.h did not include a prototype for bcm47xx_fill_sprom() therefore add one, and make sure we do include that header to fix -Wmissing-prototypes warnings.

---
 drivers/firmware/broadcom/bcm47xx_sprom.c |  1 +
 include/linux/bcm47xx_sprom.h             | 10 ++++++++++
 2 files changed, 11 insertions(+)
drivers/firmware/broadcom/bcm47xx_sprom.c +1 -0
index 4787f86c8ac1..14fbcd11657c 100644
@@ -27,6 +27,7 @@
  */
 
 #include <linux/bcm47xx_nvram.h>
+#include <linux/bcm47xx_sprom.h>
 #include <linux/bcma/bcma.h>
 #include <linux/etherdevice.h>
 #include <linux/if_ether.h>
include/linux/bcm47xx_sprom.h +10 -0
index b0f4424f34fc..f8254fd53e15 100644
@@ -9,9 +9,19 @@
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>
 
+struct ssb_sprom;
+
 #ifdef CONFIG_BCM47XX_SPROM
+void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix,
+			bool fallback);
 int bcm47xx_sprom_register_fallbacks(void);
 #else
+static inline void bcm47xx_fill_sprom(struct ssb_sprom *sprom,
+				      const char *prefix,
+				      bool fallback)
+{
+}
+
 static inline int bcm47xx_sprom_register_fallbacks(void)
 {
 	return -ENOTSUPP;
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 MIPS: BCM47xx: Include bcm47xx_sprom.h

In reply to Florian Fainelli

Now that bcm47xx_sprom.h contains a prototype for bcm47xx_fill_sprom, include that header file directly from bcm47xx.h.

---
 arch/mips/include/asm/mach-bcm47xx/bcm47xx.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/mips/include/asm/mach-bcm47xx/bcm47xx.h +1 -3
index d7f1ef246d5c..93817bfb7fb2 100644
@@ -10,6 +10,7 @@
 #include <linux/bcma/bcma.h>
 #include <linux/bcma/bcma_soc.h>
 #include <linux/bcm47xx_nvram.h>
+#include <linux/bcm47xx_sprom.h>
 
 enum bcm47xx_bus_type {
 #ifdef CONFIG_BCM47XX_SSB
@@ -32,9 +33,6 @@ union bcm47xx_bus {
 extern union bcm47xx_bus bcm47xx_bus;
 extern enum bcm47xx_bus_type bcm47xx_bus_type;
 
-void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix,
-			bool fallback);
-
 void bcm47xx_set_system_type(u16 chip_id);
 
 #endif /* __ASM_BCM47XX_H */
Signature · 1 line
2.17.1
#3 lore raw
In reply to Florian Fainelli
Quoted 4 lines · Florian Fainelli

Hi Thomas,

This patch series fixes W=1 -Wmissing-prototypes warnings for the bcm47xx_sprom.c firmware file.

Thomas, can you apply these patches if you are fine with them? Thanks

Quoted 12 lines

Thanks!

Florian Fainelli (2):
firmware: bcm47xx_sprom: Fix -Wmissing-prototypes warnings
MIPS: BCM47xx: Include bcm47xx_sprom.h

 arch/mips/include/asm/mach-bcm47xx/bcm47xx.h |  4 +---
 drivers/firmware/broadcom/bcm47xx_sprom.c    |  1 +
 include/linux/bcm47xx_sprom.h                | 10 ++++++++++
 3 files changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
Florian
#4 lore raw
Quoted 9 lines · Florian Fainelli
Quoted 4 lines · Florian Fainelli

Hi Thomas,

This patch series fixes W=1 -Wmissing-prototypes warnings for the bcm47xx_sprom.c firmware file.

Thomas, can you apply these patches if you are fine with them? Thanks

I was unsure about the maintainer status of drivers/firmware/broadcom, but I'll apply it to mips-next after merge window.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#5 lore raw
In reply to Florian Fainelli
Quoted 7 lines · Florian Fainelli

Hi Thomas,

This patch series fixes W=1 -Wmissing-prototypes warnings for the bcm47xx_sprom.c firmware file.

Thanks!

Quoted 8 lines

Florian Fainelli (2):
firmware: bcm47xx_sprom: Fix -Wmissing-prototypes warnings
MIPS: BCM47xx: Include bcm47xx_sprom.h

 arch/mips/include/asm/mach-bcm47xx/bcm47xx.h |  4 +---
 drivers/firmware/broadcom/bcm47xx_sprom.c    |  1 +
 include/linux/bcm47xx_sprom.h                | 10 ++++++++++
 3 files changed, 12 insertions(+), 3 deletions(-)

series applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]