Re: [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk'

Arnd Bergmann
2023-05-11T08:49:43Z

On Thu, May 11, 2023, at 10:06, Niklas Schnelle wrote:
> On Thu, 2023-05-11 at 09:21 +0200, Arnd Bergmann wrote:
>> On Thu, May 11, 2023, at 00:31, kernel test robot wrote:
>> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git
>> > has_ioport_v4
>> > head: b873f53aa1a6487f4a450747bd5ee38afad6dfe4
>> > commit: 216a01adc35d677e5b2db113a4df427faae01e75 [36/41] usb:
>> > pci-quirks: handle HAS_IOPORT dependencies
>> > config: x86_64-randconfig-a014
>> > (https://download.01.org/0day-ci/archive/20230511/202305110634.RGuHbrxM-lkp@intel.com/config)
>> >
>> > > > drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk' [-Wmissing-prototypes]
>> > int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
>> > ^
>> > drivers/usb/host/pci-quirks.c:289:1: note: declare 'static' if the
>> > function is not intended to be used outside of this translation unit
>> > int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
>> > ^
>> > static
>> > 1 warning generated.
>>
>> It looks like the declaration was dropped by accident, it should
>> have been moved into the #ifdef.
>>
>> Arnd
>
> I think I saw it but assumed that the extern declaration in
> include/linux/usb/hcd.h was enough. I guess before this was hidden by
> the missing CONFIG_USB_PCI_AMD. Should be fixed now.

Ok. It looks like linux/usb/hcd.h is just not included in quirks.c,
so adding an #include should also fix it.

Arnd