Message ID | 20180808220155.23636-1-vz@mleia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] usb storage: group dependent USB storage Kconfig entries together | expand |
On Thu, Aug 09, 2018 at 01:01:54AM +0300, Vladimir Zapolskiy wrote: > Instead of explicit setting of USB_STORAGE dependency for every > underlying build entries, exploit if USB_STORAGE / endif block. Why change this? What benifit does this provide? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 9 Aug 2018, Vladimir Zapolskiy wrote: > Instead of explicit setting of USB_STORAGE dependency for every > underlying build entries, exploit if USB_STORAGE / endif block. > > Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> I think this is a worthwhile cleanup, although to make Greg happy you should mention in the description that this shortens the Kconfig file, making it easier to read and less error-prone, with no changes in behavior. > @@ -188,7 +177,6 @@ config USB_STORAGE_CYPRESS_ATACB > config USB_STORAGE_ENE_UB6250 > tristate "USB ENE card reader support" > depends on SCSI > - depends on USB_STORAGE You can also remove the "depends on SCSI" line here, since USB_STORAGE already depends on SCSI. > @@ -202,7 +190,7 @@ config USB_STORAGE_ENE_UB6250 > > config USB_UAS > tristate "USB Attached SCSI" > - depends on SCSI && USB_STORAGE > + depends on SCSI > help > The USB Attached SCSI protocol is supported by some USB > storage devices. It permits higher performance by supporting As Oliver points out, uas is significantly different from all the other entries in this file. They are sub-drivers for usb-storage, whereas uas is an almost totally separate driver. Yes, it does depend on usb-storage now, but that's subject to change in the future since the overlap between the two drivers is quite small. Just put the UAS portion outside the new conditional region and keep its explicit dependencies. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Alan, thank you for review. On 08/09/2018 05:01 PM, Alan Stern wrote: > On Thu, 9 Aug 2018, Vladimir Zapolskiy wrote: > >> Instead of explicit setting of USB_STORAGE dependency for every >> underlying build entries, exploit if USB_STORAGE / endif block. >> >> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> > > I think this is a worthwhile cleanup, although to make Greg happy you > should mention in the description that this shortens the Kconfig file, > making it easier to read and less error-prone, with no changes in > behavior. Right, I assumed that the change was quite self-explanatory. >> @@ -188,7 +177,6 @@ config USB_STORAGE_CYPRESS_ATACB >> config USB_STORAGE_ENE_UB6250 >> tristate "USB ENE card reader support" >> depends on SCSI >> - depends on USB_STORAGE > > You can also remove the "depends on SCSI" line here, since USB_STORAGE > already depends on SCSI. > Still my intention is to make it in the second change, because at the same time I remove a duplicated information from a helper note, I hope it is acceptable. >> @@ -202,7 +190,7 @@ config USB_STORAGE_ENE_UB6250 >> >> config USB_UAS >> tristate "USB Attached SCSI" >> - depends on SCSI && USB_STORAGE >> + depends on SCSI >> help >> The USB Attached SCSI protocol is supported by some USB >> storage devices. It permits higher performance by supporting > > As Oliver points out, uas is significantly different from all the other > entries in this file. They are sub-drivers for usb-storage, whereas > uas is an almost totally separate driver. Yes, it does depend on > usb-storage now, but that's subject to change in the future since the > overlap between the two drivers is quite small. > > Just put the UAS portion outside the new conditional region and keep > its explicit dependencies. > Indeed. -- Best wishes, Vladimir -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig index ec84758f0e23..0aef832d3be6 100644 --- a/drivers/usb/storage/Kconfig +++ b/drivers/usb/storage/Kconfig @@ -23,16 +23,16 @@ config USB_STORAGE To compile this driver as a module, choose M here: the module will be called usb-storage. +if USB_STORAGE + config USB_STORAGE_DEBUG bool "USB Mass Storage verbose debug" - depends on USB_STORAGE help Say Y here in order to have the USB Mass Storage code generate verbose debugging messages. config USB_STORAGE_REALTEK tristate "Realtek Card Reader support" - depends on USB_STORAGE help Say Y here to include additional code to support the power-saving function for Realtek RTS51xx USB card readers. @@ -46,7 +46,6 @@ config REALTEK_AUTOPM config USB_STORAGE_DATAFAB tristate "Datafab Compact Flash Reader support" - depends on USB_STORAGE help Support for certain Datafab CompactFlash readers. Datafab has a web page at <http://www.datafab.com/>. @@ -55,7 +54,6 @@ config USB_STORAGE_DATAFAB config USB_STORAGE_FREECOM tristate "Freecom USB/ATAPI Bridge support" - depends on USB_STORAGE help Support for the Freecom USB to IDE/ATAPI adaptor. Freecom has a web page at <http://www.freecom.de/>. @@ -64,7 +62,6 @@ config USB_STORAGE_FREECOM config USB_STORAGE_ISD200 tristate "ISD-200 USB/ATA Bridge support" - depends on USB_STORAGE ---help--- Say Y here if you want to use USB Mass Store devices based on the In-Systems Design ISD-200 USB/ATA bridge. @@ -82,7 +79,6 @@ config USB_STORAGE_ISD200 config USB_STORAGE_USBAT tristate "USBAT/USBAT02-based storage support" - depends on USB_STORAGE help Say Y here to include additional code to support storage devices based on the SCM/Shuttle USBAT/USBAT02 processors. @@ -105,7 +101,6 @@ config USB_STORAGE_USBAT config USB_STORAGE_SDDR09 tristate "SanDisk SDDR-09 (and other SmartMedia, including DPCM) support" - depends on USB_STORAGE help Say Y here to include additional code to support the Sandisk SDDR-09 SmartMedia reader in the USB Mass Storage driver. @@ -115,7 +110,6 @@ config USB_STORAGE_SDDR09 config USB_STORAGE_SDDR55 tristate "SanDisk SDDR-55 SmartMedia support" - depends on USB_STORAGE help Say Y here to include additional code to support the Sandisk SDDR-55 SmartMedia reader in the USB Mass Storage driver. @@ -124,7 +118,6 @@ config USB_STORAGE_SDDR55 config USB_STORAGE_JUMPSHOT tristate "Lexar Jumpshot Compact Flash Reader" - depends on USB_STORAGE help Say Y here to include additional code to support the Lexar Jumpshot USB CompactFlash reader. @@ -133,7 +126,6 @@ config USB_STORAGE_JUMPSHOT config USB_STORAGE_ALAUDA tristate "Olympus MAUSB-10/Fuji DPC-R1 support" - depends on USB_STORAGE help Say Y here to include additional code to support the Olympus MAUSB-10 and Fujifilm DPC-R1 USB Card reader/writer devices. @@ -145,7 +137,6 @@ config USB_STORAGE_ALAUDA config USB_STORAGE_ONETOUCH tristate "Support OneTouch Button on Maxtor Hard Drives" - depends on USB_STORAGE depends on INPUT=y || INPUT=USB_STORAGE help Say Y here to include additional code to support the Maxtor OneTouch @@ -160,7 +151,6 @@ config USB_STORAGE_ONETOUCH config USB_STORAGE_KARMA tristate "Support for Rio Karma music player" - depends on USB_STORAGE help Say Y here to include additional code to support the Rio Karma USB interface. @@ -174,7 +164,6 @@ config USB_STORAGE_KARMA config USB_STORAGE_CYPRESS_ATACB tristate "SAT emulation on Cypress USB/ATA Bridge with ATACB" - depends on USB_STORAGE ---help--- Say Y here if you want to use SAT (ata pass through) on devices based on the Cypress USB/ATA bridge supporting ATACB. This will allow you @@ -188,7 +177,6 @@ config USB_STORAGE_CYPRESS_ATACB config USB_STORAGE_ENE_UB6250 tristate "USB ENE card reader support" depends on SCSI - depends on USB_STORAGE ---help--- Say Y here if you wish to control a ENE SD/MS Card reader. Note that this driver does not support SM cards. @@ -202,7 +190,7 @@ config USB_STORAGE_ENE_UB6250 config USB_UAS tristate "USB Attached SCSI" - depends on SCSI && USB_STORAGE + depends on SCSI help The USB Attached SCSI protocol is supported by some USB storage devices. It permits higher performance by supporting @@ -212,3 +200,5 @@ config USB_UAS say 'Y' or 'M' here and the kernel will use the right driver. If you compile this driver as a module, it will be named uas. + +endif # USB_STORAGE
Instead of explicit setting of USB_STORAGE dependency for every underlying build entries, exploit if USB_STORAGE / endif block. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> --- drivers/usb/storage/Kconfig | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-)