Skip to contentSkip to conversation

ssb: host_soc depends on sprom

PATCH Superseded Arnd Bergmann 5 participants 19 messages Jan 13, 2016 – Jan 19, 2016

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

PATCH 1/1 ssb: host_soc depends on sprom

Drivers that use the SSB sprom functionality typically 'select SSB_SPROM' from Kconfig, but CONFIG_SSB_HOST_SOC misses this, which results in a build failure unless at least one of the other drivers that selects it is enabled:

drivers/built-in.o: In function `ssb_host_soc_get_invariants':
(.text+0x459494): undefined reference to `ssb_fill_sprom_with_fallback'

This adds the same select statement that is used elsewhere.

Fixes 541c9a84cd85 ("ssb: pick SoC invariants code from MIPS BCM47xx arch")

---
I'm not sure who the right person is to pick up the fix. The patch that introduced the problem was merged by Kalle through the iwlwifi tree.

drivers/ssb/Kconfig +1 -0
index 0c675861623f..d8e4219c2324 100644
@@ -83,6 +83,7 @@ config SSB_SDIOHOST
 config SSB_HOST_SOC
 	bool "Support for SSB bus on SoC"
 	depends on SSB && BCM47XX_NVRAM
+	select SSB_SPROM
 	help
 	  Host interface for a SSB directly mapped into memory. This is
 	  for some Broadcom SoCs from the BCM47xx and BCM53xx lines.
#1 lore raw
Quoted 8 lines · Arnd Bergmann

Drivers that use the SSB sprom functionality typically 'select SSB_SPROM' from Kconfig, but CONFIG_SSB_HOST_SOC misses this, which results in a build failure unless at least one of the other drivers that selects it is enabled:

drivers/built-in.o: In function `ssb_host_soc_get_invariants':
(.text+0x459494): undefined reference to `ssb_fill_sprom_with_fallback'

Quoted 7 lines

This adds the same select statement that is used elsewhere.

Fixes 541c9a84cd85 ("ssb: pick SoC invariants code from MIPS BCM47xx arch")

---
I'm not sure who the right person is to pick up the fix. The patch that introduced the problem was merged by Kalle through the iwlwifi tree.

I can take it. For historical reasons ssb patches go through my wireless-drivers trees.

Signature · 1 line
Kalle Valo
maintainer
#2 lore raw

From: Kalle Valo <[email protected]>
Date: Thu, 14 Jan 2016 08:46:29 +0200

Quoted 2 lines

I can take it. For historical reasons ssb patches go through my wireless-drivers trees.

+1

#3 lore raw

PATCH RESEND 1/1 ssb: mark ssb_bus_register as __maybe_unused

In reply to Kalle Valo

The SoC variant of the ssb code is now optional like the other ones, which means we can build the framwork without any front-end, but that results in a warning:

drivers/ssb/main.c:616:12: warning: 'ssb_bus_register' defined but not used [-Wunused-function]

This annotates the ssb_bus_register function as __maybe_unused to shut up the warning. A configuration like this will not work on any hardware of course, but we still want this to silently build without warnings if the configuration is allowed in the first place.

Fixes 845da6e58e19 ("ssb: add Kconfig entry for compiling SoC related code")

---

Quoted 2 lines · On Thursday 14 January 2016 08:46:29 Kalle Valo wrote:

I can take it. For historical reasons ssb patches go through my wireless-drivers trees.

I found this in my backlog, and I believe it still applies. Can you take that one too?

drivers/ssb/main.c +4 -3
index cde5ff7529eb..d1a750760cf3 100644
@@ -613,9 +613,10 @@ out:
 	return err;
 }
 
-static int ssb_bus_register(struct ssb_bus *bus,
-			    ssb_invariants_func_t get_invariants,
-			    unsigned long baseaddr)
+static int __maybe_unused
+ssb_bus_register(struct ssb_bus *bus,
+		 ssb_invariants_func_t get_invariants,
+		 unsigned long baseaddr)
 {
 	int err;
 
#4 lore raw

Re: [PATCH, RESEND] ssb: mark ssb_bus_register as __maybe_unused

Quoted 6 lines · Arnd Bergmann
Quoted 2 lines · On Thursday 14 January 2016 08:46:29 Kalle Valo wrote:

I can take it. For historical reasons ssb patches go through my wireless-drivers trees.

I found this in my backlog, and I believe it still applies. Can you take that one too?

I'm not sure what you mean here, I can take any ssb patch if it's ok for Michael or Rafal :)

Just please submit the patch properly (with S-o-B line) and CC linux-wireless so that it goes to patchwork.

Signature · 1 line
Kalle Valo
#5 lore raw

Re: [PATCH, RESEND] ssb: mark ssb_bus_register as __maybe_unused

Quoted 6 lines · Kalle Valo
Quoted 4 lines · Arnd Bergmann
Quoted 2 lines · On Thursday 14 January 2016 08:46:29 Kalle Valo wrote:

I can take it. For historical reasons ssb patches go through my wireless-drivers trees.

Quoted 8 lines
Quoted 2 lines

I found this in my backlog, and I believe it still applies. Can you take that one too?

I'm not sure what you mean here, I can take any ssb patch if it's ok for Michael or Rafal :)

Just please submit the patch properly (with S-o-B line) and CC linux-wireless so that it goes to patchwork.

It was already sent once and Acked by Michael:
https://patchwork.kernel.org/patch/7543191/

The problem was not cc-ing linux-wireless so it wasn't picked by the linux-wireless patchwork.

Signature · 1 line
Rafa?
#6 lore raw

Re: [PATCH, RESEND] ssb: mark ssb_bus_register as __maybe_unused

Quoted 13 lines · Rafa? Mi?ecki
Quoted 12 lines · Kalle Valo
Quoted 6 lines · Arnd Bergmann
Quoted 2 lines · On Thursday 14 January 2016 08:46:29 Kalle Valo wrote:

I can take it. For historical reasons ssb patches go through my wireless-drivers trees.

I found this in my backlog, and I believe it still applies. Can you take that one too?

I'm not sure what you mean here, I can take any ssb patch if it's ok for Michael or Rafal :)

Quoted 8 lines
Quoted 2 lines

Just please submit the patch properly (with S-o-B line) and CC linux-wireless so that it goes to patchwork.

It was already sent once and Acked by Michael:
https://patchwork.kernel.org/patch/7543191/

The problem was not cc-ing linux-wireless so it wasn't picked by the linux-wireless patchwork.

Ah, that's why I missed it. I only follow patchwork, I basically ignore patches which are sent via email. Arnd, can you please resend the patch and CC linux-wireless? Sorry for the trouble.

To avoid this in the future I think we should replace netdev with linux-wireless in the MAINTAINERS entry:

SONICS SILICON BACKPLANE DRIVER (SSB)

M:      Michael Buesch <[email protected]>
L:      netdev at vger.kernel.org
S:      Maintained
F:      drivers/ssb/
F:      include/linux/ssb/

Are people ok with that? Patches welcome :)

Signature · 1 line
Kalle Valo
maintainer
#7 lore raw

ssb: Set linux-wireless as MAINTAINERS list

ssb patches go through the linux-wireless tree.
Set the list to linux-wireless, so linux-wireless patchwork can catch the patches.

---

MAINTAINERS +1 -1
Index: linux/MAINTAINERS
===================================================================
@@ -10036,7 +10036,7 @@ F:	drivers/net/ethernet/natsemi/sonic.*
 
 SONICS SILICON BACKPLANE DRIVER (SSB)
 M:	Michael Buesch <[email protected]>
-L:	[email protected]
+L:	[email protected]
 S:	Maintained
 F:	drivers/ssb/
 F:	include/linux/ssb/
Signature · 1 line
Michael
#8 lore raw

Re: ssb: Set linux-wireless as MAINTAINERS list

Quoted 2 lines · Michael B?sch

ssb patches go through the linux-wireless tree.
Set the list to linux-wireless, so linux-wireless patchwork can catch the patches.

Thanks Michael

#9 lore raw

Re: ssb: Set linux-wireless as MAINTAINERS list

Quoted 6 lines · Rafa? Mi?ecki
Quoted 2 lines · Michael B?sch

ssb patches go through the linux-wireless tree. Set the list to linux-wireless, so linux-wireless patchwork can catch the patches.

Thanks Michael

Thanks from me also. I'm planning to send this to 4.5.

Signature · 1 line
Kalle Valo
#13 lore raw

PATCH 1/1 ssb: mark ssb_bus_register as __maybe_unused

In reply to Kalle Valo

The SoC variant of the ssb code is now optional like the other ones, which means we can build the framwork without any front-end, but that results in a warning:

drivers/ssb/main.c:616:12: warning: 'ssb_bus_register' defined but not used [-Wunused-function]

This annotates the ssb_bus_register function as __maybe_unused to shut up the warning. A configuration like this will not work on any hardware of course, but we still want this to silently build without warnings if the configuration is allowed in the first place.

Fixes 845da6e58e19 ("ssb: add Kconfig entry for compiling SoC related code")

---
Resent to linux-wireless as requested

drivers/ssb/main.c +4 -3
index cde5ff7529eb..d1a750760cf3 100644
@@ -613,9 +613,10 @@ out:
 	return err;
 }
 
-static int ssb_bus_register(struct ssb_bus *bus,
-			    ssb_invariants_func_t get_invariants,
-			    unsigned long baseaddr)
+static int __maybe_unused
+ssb_bus_register(struct ssb_bus *bus,
+		 ssb_invariants_func_t get_invariants,
+		 unsigned long baseaddr)
 {
 	int err;
 
#14 lore raw

Re: [PATCH, RESEND^2] ssb: mark ssb_bus_register as __maybe_unused

Quoted 12 lines · Arnd Bergmann

The SoC variant of the ssb code is now optional like the other ones, which means we can build the framwork without any front-end, but that results in a warning:

drivers/ssb/main.c:616:12: warning: 'ssb_bus_register' defined but not used [-Wunused-function]

This annotates the ssb_bus_register function as __maybe_unused to shut up the warning. A configuration like this will not work on any hardware of course, but we still want this to silently build without warnings if the configuration is allowed in the first place.

Quoted 5 lines
Fixes 845da6e58e19 ("ssb: add Kconfig entry for compiling SoC related code")

---
Resent to linux-wireless as requested

Thanks, and sorry for the hassle. I'm planning to push this to 4.5.

Signature · 1 line
Kalle Valo
Applied
#15 lore raw

Re: [RESEND^2] ssb: mark ssb_bus_register as __maybe_unused

In reply to Arnd Bergmann
Quoted 13 lines

The SoC variant of the ssb code is now optional like the other ones, which means we can build the framwork without any front-end, but that results in a warning:

drivers/ssb/main.c:616:12: warning: 'ssb_bus_register' defined but not used [-Wunused-function]

This annotates the ssb_bus_register function as __maybe_unused to shut up the warning. A configuration like this will not work on any hardware of course, but we still want this to silently build without warnings if the configuration is allowed in the first place.

Quoted 3 lines
Fixes 845da6e58e19 ("ssb: add Kconfig entry for compiling SoC related code")

Thanks, applied to wireless-drivers.git.

Kalle Valo

Applied
#16 lore raw

Re: [RESEND^2] ssb: mark ssb_bus_register as __maybe_unused

In reply to Arnd Bergmann
Quoted 13 lines

The SoC variant of the ssb code is now optional like the other ones, which means we can build the framwork without any front-end, but that results in a warning:

drivers/ssb/main.c:616:12: warning: 'ssb_bus_register' defined but not used [-Wunused-function]

This annotates the ssb_bus_register function as __maybe_unused to shut up the warning. A configuration like this will not work on any hardware of course, but we still want this to silently build without warnings if the configuration is allowed in the first place.

Quoted 3 lines
Fixes 845da6e58e19 ("ssb: add Kconfig entry for compiling SoC related code")

Thanks, applied to wireless-drivers.git.

Kalle Valo

Applied
#17 lore raw

Re: [RESEND^2] ssb: mark ssb_bus_register as __maybe_unused

In reply to Arnd Bergmann
Quoted 13 lines

The SoC variant of the ssb code is now optional like the other ones, which means we can build the framwork without any front-end, but that results in a warning:

drivers/ssb/main.c:616:12: warning: 'ssb_bus_register' defined but not used [-Wunused-function]

This annotates the ssb_bus_register function as __maybe_unused to shut up the warning. A configuration like this will not work on any hardware of course, but we still want this to silently build without warnings if the configuration is allowed in the first place.

Quoted 3 lines
Fixes 845da6e58e19 ("ssb: add Kconfig entry for compiling SoC related code")

Thanks, applied to wireless-drivers.git.

Kalle Valo

#18 lore raw
In reply to Arnd Bergmann
Quoted 5 lines · Arnd Bergmann

Drivers that use the SSB sprom functionality typically 'select SSB_SPROM' from Kconfig, but CONFIG_SSB_HOST_SOC misses this, which results in a build failure unless at least one of the other drivers that selects it is enabled:

Quoted 7 lines

drivers/built-in.o: In function `ssb_host_soc_get_invariants':
(.text+0x459494): undefined reference to `ssb_fill_sprom_with_fallback'

This adds the same select statement that is used elsewhere.

Fixes 541c9a84cd85 ("ssb: pick SoC invariants code from MIPS BCM47xx arch")

I missed this dependency, thanks, patch looks OK.