Message ID | 20190712133928.21394-3-philmd@redhat.com |
---|---|
State | New |
Headers | show |
Series | vl: Allow building with CONFIG_BLUETOOTH disabled | expand |
On 12/07/19 15:39, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > hw/usb/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig > index 564305e283..1b435ec002 100644 > --- a/hw/usb/Kconfig > +++ b/hw/usb/Kconfig > @@ -82,7 +82,7 @@ config USB_NETWORK > config USB_BLUETOOTH > bool > default y > - depends on USB > + depends on USB && BLUETOOTH > > config USB_SMARTCARD > bool > Shouldn't it select BLUETOOTH instead? Paolo
On 7/12/19 3:58 PM, Paolo Bonzini wrote: > On 12/07/19 15:39, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> >> --- >> hw/usb/Kconfig | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig >> index 564305e283..1b435ec002 100644 >> --- a/hw/usb/Kconfig >> +++ b/hw/usb/Kconfig >> @@ -82,7 +82,7 @@ config USB_NETWORK >> config USB_BLUETOOTH >> bool >> default y >> - depends on USB >> + depends on USB && BLUETOOTH >> >> config USB_SMARTCARD >> bool >> > > Shouldn't it select BLUETOOTH instead? I wondered but am not sure, it is default to Yes, but Bluetooth code is deprecated and print a big warning when you use it, so I think this device should not be selected as default, neither pull in the deprecated bluetooth code. So personally I'd respin without 'default y'. If you have a good reason to use it, I can use 'select' instead. Regards, Phil.
On 12/07/19 16:16, Philippe Mathieu-Daudé wrote: > I wondered but am not sure, it is default to Yes, but Bluetooth code is > deprecated and print a big warning when you use it, so I think this > device should not be selected as default, neither pull in the deprecated > bluetooth code. > > So personally I'd respin without 'default y'. If you have a good reason > to use it, I can use 'select' instead. There are two separate questions. One is whether USB_BLUETOOTH should select BLUETOOTH and the answer there is almost certainly yes (in the words of kconfig.rst, BLUETOOTH is a "subsystem" while USB_BLUETOOTH is a "device"; devices select the bus that the device provides). The other is whether we want to enable USB_BLUETOOTH by default. I wouldn't have any problem there, but if we disable it basically no one would ship/use it and we might as well delete the whole thing. Paolo
On 7/12/19 4:58 PM, Paolo Bonzini wrote: > On 12/07/19 16:16, Philippe Mathieu-Daudé wrote: >> I wondered but am not sure, it is default to Yes, but Bluetooth code is >> deprecated and print a big warning when you use it, so I think this >> device should not be selected as default, neither pull in the deprecated >> bluetooth code. >> >> So personally I'd respin without 'default y'. If you have a good reason >> to use it, I can use 'select' instead. > > There are two separate questions. One is whether USB_BLUETOOTH should > select BLUETOOTH and the answer there is almost certainly yes (in the > words of kconfig.rst, BLUETOOTH is a "subsystem" while USB_BLUETOOTH is > a "device"; devices select the bus that the device provides). Fair :) > The other is whether we want to enable USB_BLUETOOTH by default. I > wouldn't have any problem there, but if we disable it basically no one > would ship/use it and we might as well delete the whole thing. The only user is the ARM Nokia N-series board, so if we set default=n, the Bluetooth subsystem will be only be selected on arm-softmmu (and aarch64-softmmu). This seems a sane cleanup. If another board wants to use the bluetooth code, it should probably move it out of the orphan status.
On 12/07/19 18:45, Philippe Mathieu-Daudé wrote: > On 7/12/19 4:58 PM, Paolo Bonzini wrote: >> The other is whether we want to enable USB_BLUETOOTH by default. I >> wouldn't have any problem there, but if we disable it basically no one >> would ship/use it and we might as well delete the whole thing. > > The only user is the ARM Nokia N-series board, so if we set default=n, > the Bluetooth subsystem will be only be selected on arm-softmmu (and > aarch64-softmmu). > > This seems a sane cleanup. If another board wants to use the bluetooth > code, it should probably move it out of the orphan status. Fair! ;) Paolo
Hi Paolo, On 7/12/19 7:31 PM, Paolo Bonzini wrote: > On 12/07/19 18:45, Philippe Mathieu-Daudé wrote: >> On 7/12/19 4:58 PM, Paolo Bonzini wrote: >>> The other is whether we want to enable USB_BLUETOOTH by default. I >>> wouldn't have any problem there, but if we disable it basically no one >>> would ship/use it and we might as well delete the whole thing. >> >> The only user is the ARM Nokia N-series board, so if we set default=n, >> the Bluetooth subsystem will be only be selected on arm-softmmu (and >> aarch64-softmmu). Using (1): + default y if BLUETOOTH depends on USB + select BLUETOOTH I get: KconfigDataError: cycle found including BLUETOOTH This works but doesn't follow kconfig.rst (2): + default y if BLUETOOTH depends on USB This works (kconfig.rst compliant, 3): + default n depends on USB + select BLUETOOTH Are you OK with (2) or you prefer (3)? >> >> This seems a sane cleanup. If another board wants to use the bluetooth >> code, it should probably move it out of the orphan status. > > Fair! ;) > > Paolo >
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index 564305e283..1b435ec002 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -82,7 +82,7 @@ config USB_NETWORK config USB_BLUETOOTH bool default y - depends on USB + depends on USB && BLUETOOTH config USB_SMARTCARD bool
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- hw/usb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)