Message ID | 20200812202018.49046-4-alcooperx@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | usb: Add driver for USB signal re-mapper | expand |
Hi Al,
I love your patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on linux/master linus/master v5.8 next-20200812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Al-Cooper/usb-Add-driver-for-USB-signal-re-mapper/20200813-042328
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/usb/host/brcmstb-usb-pinmap.c:219:6: warning: no previous prototype for 'sync_all_pins' [-Wmissing-prototypes]
219 | void sync_all_pins(struct brcmstb_usb_pinmap_data *pdata)
| ^~~~~~~~~~~~~
vim +/sync_all_pins +219 drivers/usb/host/brcmstb-usb-pinmap.c
06f59ffd15dd0d5 Al Cooper 2020-08-12 218
06f59ffd15dd0d5 Al Cooper 2020-08-12 @219 void sync_all_pins(struct brcmstb_usb_pinmap_data *pdata)
06f59ffd15dd0d5 Al Cooper 2020-08-12 220 {
06f59ffd15dd0d5 Al Cooper 2020-08-12 221 struct out_pin *pout;
06f59ffd15dd0d5 Al Cooper 2020-08-12 222 struct in_pin *pin;
06f59ffd15dd0d5 Al Cooper 2020-08-12 223 int val;
06f59ffd15dd0d5 Al Cooper 2020-08-12 224 int x;
06f59ffd15dd0d5 Al Cooper 2020-08-12 225
06f59ffd15dd0d5 Al Cooper 2020-08-12 226 /*
06f59ffd15dd0d5 Al Cooper 2020-08-12 227 * Enable the override, clear any changed condition and
06f59ffd15dd0d5 Al Cooper 2020-08-12 228 * propagate the state to the GPIO for all out pins.
06f59ffd15dd0d5 Al Cooper 2020-08-12 229 */
06f59ffd15dd0d5 Al Cooper 2020-08-12 230 pout = pdata->out_pins;
06f59ffd15dd0d5 Al Cooper 2020-08-12 231 for (x = 0; x < pdata->out_count; x++) {
06f59ffd15dd0d5 Al Cooper 2020-08-12 232 pinmap_set(pdata->regs, pout->enable_mask);
06f59ffd15dd0d5 Al Cooper 2020-08-12 233 pinmap_set(pdata->regs, pout->clr_changed_mask);
06f59ffd15dd0d5 Al Cooper 2020-08-12 234 pinmap_unset(pdata->regs, pout->clr_changed_mask);
06f59ffd15dd0d5 Al Cooper 2020-08-12 235 val = readl(pdata->regs) & pout->value_mask;
06f59ffd15dd0d5 Al Cooper 2020-08-12 236 gpiod_set_value(pout->gpiod, val ? 1 : 0);
06f59ffd15dd0d5 Al Cooper 2020-08-12 237 pout++;
06f59ffd15dd0d5 Al Cooper 2020-08-12 238 }
06f59ffd15dd0d5 Al Cooper 2020-08-12 239
06f59ffd15dd0d5 Al Cooper 2020-08-12 240 /* sync and enable all in pins. */
06f59ffd15dd0d5 Al Cooper 2020-08-12 241 pin = pdata->in_pins;
06f59ffd15dd0d5 Al Cooper 2020-08-12 242 for (x = 0; x < pdata->in_count; x++) {
06f59ffd15dd0d5 Al Cooper 2020-08-12 243 sync_in_pin(pin);
06f59ffd15dd0d5 Al Cooper 2020-08-12 244 pinmap_set(pdata->regs, pin->enable_mask);
06f59ffd15dd0d5 Al Cooper 2020-08-12 245 pin++;
06f59ffd15dd0d5 Al Cooper 2020-08-12 246 }
06f59ffd15dd0d5 Al Cooper 2020-08-12 247 }
06f59ffd15dd0d5 Al Cooper 2020-08-12 248
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
On Wed, Aug 12, 2020 at 04:20:18PM -0400, Al Cooper wrote: > From: Al Cooper <al.cooper@broadcom.com> > > Add Kconfig and Makefile changes to build brcmstb-usb-pinmap and > update MAINTAINERS for the new driver. This can be part of the previous patch, or at least the Kconfig and Makefile changes should be there so that we build the code when we add it. > refs #SWLINUX-5537 What is this? > > Signed-off-by: Al Cooper <al.cooper@broadcom.com> > --- > MAINTAINERS | 8 ++++++++ > drivers/usb/host/Kconfig | 4 ++++ > drivers/usb/host/Makefile | 1 + > 3 files changed, 13 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index f0569cf304ca..3a44ac61899b 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -3527,6 +3527,14 @@ S: Maintained > F: Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml > F: drivers/usb/host/ehci-brcm.* > > +BROADCOM BRCMSTB USB PIN MAP DRIVER > +M: Al Cooper <alcooperx@gmail.com> > +L: linux-usb@vger.kernel.org > +L: bcm-kernel-feedback-list@broadcom.com > +S: Maintained > +F: Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml > +F: drivers/usb/host/brcmstb-usb-pinmap.c > + > BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER > M: Al Cooper <alcooperx@gmail.com> > L: linux-kernel@vger.kernel.org > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > index 1cb3004ea7b2..9c285053bb0c 100644 > --- a/drivers/usb/host/Kconfig > +++ b/drivers/usb/host/Kconfig > @@ -109,12 +109,16 @@ endif # USB_XHCI_HCD > config USB_EHCI_BRCMSTB > tristate > > +config BRCM_USB_PINMAP > + tristate > + > config USB_BRCMSTB > tristate "Broadcom STB USB support" > depends on (ARCH_BRCMSTB && PHY_BRCM_USB) || COMPILE_TEST > select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD > select USB_EHCI_BRCMSTB if USB_EHCI_HCD > select USB_XHCI_PLATFORM if USB_XHCI_HCD > + select BRCM_USB_PINMAP > help > Enables support for XHCI, EHCI and OHCI host controllers > found in Broadcom STB SoC's. > diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile > index bc731332fed9..0e63ef94790d 100644 > --- a/drivers/usb/host/Makefile > +++ b/drivers/usb/host/Makefile > @@ -90,3 +90,4 @@ obj-$(CONFIG_USB_HCD_BCMA) += bcma-hcd.o > obj-$(CONFIG_USB_HCD_SSB) += ssb-hcd.o > obj-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o > obj-$(CONFIG_USB_MAX3421_HCD) += max3421-hcd.o > +obj-$(CONFIG_BRCM_USB_PINMAP) += brcmstb-usb-pinmap.o Shouldn't this driver be in usb/misc/ with other drivers like this? Why host? Wait, why is this a separate driver at all? Why not just build it into the USB_BRCMSTB driver? thanks, greg k-h
On Thu, Aug 13, 2020 at 1:40 AM Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > > On Wed, Aug 12, 2020 at 04:20:18PM -0400, Al Cooper wrote: > > From: Al Cooper <al.cooper@broadcom.com> > > > > Add Kconfig and Makefile changes to build brcmstb-usb-pinmap and > > update MAINTAINERS for the new driver. > > This can be part of the previous patch, or at least the Kconfig and > Makefile changes should be there so that we build the code when we add > it. I'll combine the 2 patches. > > > refs #SWLINUX-5537 > > What is this? This will be removed. > > > > > Signed-off-by: Al Cooper <al.cooper@broadcom.com> > > --- > > MAINTAINERS | 8 ++++++++ > > drivers/usb/host/Kconfig | 4 ++++ > > drivers/usb/host/Makefile | 1 + > > 3 files changed, 13 insertions(+) > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index f0569cf304ca..3a44ac61899b 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -3527,6 +3527,14 @@ S: Maintained > > F: Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml > > F: drivers/usb/host/ehci-brcm.* > > > > +BROADCOM BRCMSTB USB PIN MAP DRIVER > > +M: Al Cooper <alcooperx@gmail.com> > > +L: linux-usb@vger.kernel.org > > +L: bcm-kernel-feedback-list@broadcom.com > > +S: Maintained > > +F: Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml > > +F: drivers/usb/host/brcmstb-usb-pinmap.c > > + > > BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER > > M: Al Cooper <alcooperx@gmail.com> > > L: linux-kernel@vger.kernel.org > > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > > index 1cb3004ea7b2..9c285053bb0c 100644 > > --- a/drivers/usb/host/Kconfig > > +++ b/drivers/usb/host/Kconfig > > @@ -109,12 +109,16 @@ endif # USB_XHCI_HCD > > config USB_EHCI_BRCMSTB > > tristate > > > > +config BRCM_USB_PINMAP > > + tristate > > + > > config USB_BRCMSTB > > tristate "Broadcom STB USB support" > > depends on (ARCH_BRCMSTB && PHY_BRCM_USB) || COMPILE_TEST > > select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD > > select USB_EHCI_BRCMSTB if USB_EHCI_HCD > > select USB_XHCI_PLATFORM if USB_XHCI_HCD > > + select BRCM_USB_PINMAP > > help > > Enables support for XHCI, EHCI and OHCI host controllers > > found in Broadcom STB SoC's. > > diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile > > index bc731332fed9..0e63ef94790d 100644 > > --- a/drivers/usb/host/Makefile > > +++ b/drivers/usb/host/Makefile > > @@ -90,3 +90,4 @@ obj-$(CONFIG_USB_HCD_BCMA) += bcma-hcd.o > > obj-$(CONFIG_USB_HCD_SSB) += ssb-hcd.o > > obj-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o > > obj-$(CONFIG_USB_MAX3421_HCD) += max3421-hcd.o > > +obj-$(CONFIG_BRCM_USB_PINMAP) += brcmstb-usb-pinmap.o > > Shouldn't this driver be in usb/misc/ with other drivers like this? Why > host? That does seem like a better choice, I'll move it. > > Wait, why is this a separate driver at all? Why not just build it into > the USB_BRCMSTB driver? Of the 20 or so chips supported by the BRCMSTB USB drivers, only one currently has this functionality so it seems better to have this code in it's own driver so it can be enabled in device-tree for just this chip. I also wanted to leave this in it's own driver because in the future the same hardware functionality may be added for some eMMC signals. Thanks Al > > thanks, > > greg k-h
Hi Al,
I love your patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on linux/master linus/master v5.9-rc2 next-20200824]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Al-Cooper/usb-Add-driver-for-USB-signal-re-mapper/20200813-042328
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: i386-randconfig-s002-20200824 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/usb/host/brcmstb-usb-pinmap.c:219:6: sparse: sparse: symbol 'sync_all_pins' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/MAINTAINERS b/MAINTAINERS index f0569cf304ca..3a44ac61899b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3527,6 +3527,14 @@ S: Maintained F: Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml F: drivers/usb/host/ehci-brcm.* +BROADCOM BRCMSTB USB PIN MAP DRIVER +M: Al Cooper <alcooperx@gmail.com> +L: linux-usb@vger.kernel.org +L: bcm-kernel-feedback-list@broadcom.com +S: Maintained +F: Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml +F: drivers/usb/host/brcmstb-usb-pinmap.c + BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER M: Al Cooper <alcooperx@gmail.com> L: linux-kernel@vger.kernel.org diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 1cb3004ea7b2..9c285053bb0c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -109,12 +109,16 @@ endif # USB_XHCI_HCD config USB_EHCI_BRCMSTB tristate +config BRCM_USB_PINMAP + tristate + config USB_BRCMSTB tristate "Broadcom STB USB support" depends on (ARCH_BRCMSTB && PHY_BRCM_USB) || COMPILE_TEST select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD select USB_EHCI_BRCMSTB if USB_EHCI_HCD select USB_XHCI_PLATFORM if USB_XHCI_HCD + select BRCM_USB_PINMAP help Enables support for XHCI, EHCI and OHCI host controllers found in Broadcom STB SoC's. diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index bc731332fed9..0e63ef94790d 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -90,3 +90,4 @@ obj-$(CONFIG_USB_HCD_BCMA) += bcma-hcd.o obj-$(CONFIG_USB_HCD_SSB) += ssb-hcd.o obj-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o obj-$(CONFIG_USB_MAX3421_HCD) += max3421-hcd.o +obj-$(CONFIG_BRCM_USB_PINMAP) += brcmstb-usb-pinmap.o