* [PATCH] usb: musb: fix dead select of USB_MUSB_DUAL_ROLE @ 2026-07-11 13:03 Julian Braha 2026-07-11 14:39 ` Arnd Bergmann 0 siblings, 1 reply; 5+ messages in thread From: Julian Braha @ 2026-07-11 13:03 UTC (permalink / raw) To: b-liu, gregkh; +Cc: arnd, linux-usb, linux-kernel, Julian Braha 'select' does not work on config options in a 'choice', so currently it is possible to enable USB_MUSB_POLARFIRE_SOC without USB_MUSB_DUAL_ROLE. Replace 'select' with 'depends on'. This dead select was found by kconfirm, a static analysis tool for Kconfig. Signed-off-by: Julian Braha <julianbraha@gmail.com> --- drivers/usb/musb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index f56929267eaa..f8ff2366f59f 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig @@ -116,7 +116,7 @@ config USB_MUSB_POLARFIRE_SOC tristate "Microchip PolarFire SoC platforms" depends on ARCH_MICROCHIP_POLARFIRE || COMPILE_TEST depends on NOP_USB_XCEIV - select USB_MUSB_DUAL_ROLE + depends on USB_MUSB_DUAL_ROLE help Say Y here to enable support for USB on Microchip's PolarFire SoC. -- 2.54.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: musb: fix dead select of USB_MUSB_DUAL_ROLE 2026-07-11 13:03 [PATCH] usb: musb: fix dead select of USB_MUSB_DUAL_ROLE Julian Braha @ 2026-07-11 14:39 ` Arnd Bergmann 2026-07-11 15:09 ` Julian Braha 0 siblings, 1 reply; 5+ messages in thread From: Arnd Bergmann @ 2026-07-11 14:39 UTC (permalink / raw) To: Julian Braha, Bin Liu, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel On Sat, Jul 11, 2026, at 15:03, Julian Braha wrote: > 'select' does not work on config options in a 'choice', so currently it is > possible to enable USB_MUSB_POLARFIRE_SOC without USB_MUSB_DUAL_ROLE. > > Replace 'select' with 'depends on'. > > This dead select was found by kconfirm, a static analysis tool for Kconfig. > > Signed-off-by: Julian Braha <julianbraha@gmail.com> Good catch, but I wonder if this is actually a real dependency at all. What would happen if you just remove the 'select' line here and build a polarfire kernel that only supports host or gadget mode but not dual-role? Arnd ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: musb: fix dead select of USB_MUSB_DUAL_ROLE 2026-07-11 14:39 ` Arnd Bergmann @ 2026-07-11 15:09 ` Julian Braha 2026-07-12 21:56 ` Conor Dooley 0 siblings, 1 reply; 5+ messages in thread From: Julian Braha @ 2026-07-11 15:09 UTC (permalink / raw) To: Arnd Bergmann, Bin Liu, Greg Kroah-Hartman Cc: linux-usb, linux-kernel, conor.dooley, daire.mcnamara, valentina.fernandezalanis, Michael Turquette, Stephen Boyd, claudiu.beznea, Jassi Brar, a.zummo, Alexandre Belloni, wsa, ben.dooks, heinrich.schuchardt Hi Arnd, On 7/11/26 15:39, Arnd Bergmann wrote: > Good catch, but I wonder if this is actually a real dependency > at all. What would happen if you just remove the 'select' line > here and build a polarfire kernel that only supports > host or gadget mode but not dual-role? The kernel builds just fine for me with USB_MUSB_POLARFIRE_SOC=y and USB_MUSB_DUAL_ROLE=n But I don't have this hardware so I don't know what would happen at runtime. I've CC'd more people involved in patches to this config option. - Julian Braha ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: musb: fix dead select of USB_MUSB_DUAL_ROLE 2026-07-11 15:09 ` Julian Braha @ 2026-07-12 21:56 ` Conor Dooley 2026-07-13 6:26 ` Arnd Bergmann 0 siblings, 1 reply; 5+ messages in thread From: Conor Dooley @ 2026-07-12 21:56 UTC (permalink / raw) To: Julian Braha Cc: Arnd Bergmann, Bin Liu, Greg Kroah-Hartman, linux-usb, linux-kernel, conor.dooley, daire.mcnamara, valentina.fernandezalanis, Michael Turquette, Stephen Boyd, claudiu.beznea, Jassi Brar, a.zummo, Alexandre Belloni, wsa, ben.dooks, heinrich.schuchardt [-- Attachment #1: Type: text/plain, Size: 755 bytes --] On Sat, Jul 11, 2026 at 04:09:58PM +0100, Julian Braha wrote: > Hi Arnd, > > On 7/11/26 15:39, Arnd Bergmann wrote: > > Good catch, but I wonder if this is actually a real dependency > > at all. What would happen if you just remove the 'select' line > > here and build a polarfire kernel that only supports > > host or gadget mode but not dual-role? > > The kernel builds just fine for me with USB_MUSB_POLARFIRE_SOC=y and > USB_MUSB_DUAL_ROLE=n > > But I don't have this hardware so I don't know what would happen at > runtime. > > I've CC'd more people involved in patches to this config option. This is the setup I've been using in my development environment for (probably) years. Probably the select should just be deleted. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: musb: fix dead select of USB_MUSB_DUAL_ROLE 2026-07-12 21:56 ` Conor Dooley @ 2026-07-13 6:26 ` Arnd Bergmann 0 siblings, 0 replies; 5+ messages in thread From: Arnd Bergmann @ 2026-07-13 6:26 UTC (permalink / raw) To: Conor Dooley, Julian Braha Cc: Bin Liu, Greg Kroah-Hartman, linux-usb, linux-kernel, Conor.Dooley, Daire McNamara, valentina.fernandezalanis, Michael Turquette, Stephen Boyd, Claudiu Beznea, Jassi Brar, Alessandro Zummo, Alexandre Belloni, Wolfram Sang, Ben Dooks, Heinrich Schuchardt On Sun, Jul 12, 2026, at 23:56, Conor Dooley wrote: > On Sat, Jul 11, 2026 at 04:09:58PM +0100, Julian Braha wrote: >> On 7/11/26 15:39, Arnd Bergmann wrote: >> > Good catch, but I wonder if this is actually a real dependency >> > at all. What would happen if you just remove the 'select' line >> > here and build a polarfire kernel that only supports >> > host or gadget mode but not dual-role? >> >> The kernel builds just fine for me with USB_MUSB_POLARFIRE_SOC=y and >> USB_MUSB_DUAL_ROLE=n >> > This is the setup I've been using in my development environment for > (probably) years. > > Probably the select should just be deleted. Ok, so it was probably just a misguided attempt to pick the most useful configuration by default. Julian, can you send a new patch to just drop the line? Arnd ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-13 6:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-07-11 13:03 [PATCH] usb: musb: fix dead select of USB_MUSB_DUAL_ROLE Julian Braha 2026-07-11 14:39 ` Arnd Bergmann 2026-07-11 15:09 ` Julian Braha 2026-07-12 21:56 ` Conor Dooley 2026-07-13 6:26 ` Arnd Bergmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox