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-11T10:28:07Z

On Thu, May 11, 2023, at 11:34, Niklas Schnelle wrote:
> On Thu, 2023-05-11 at 10:49 +0200, Arnd Bergmann wrote:
>> >
>> > 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.
>
> It feels a little cleaner to keep it in pci-quirks.h where it was
> before the patch. I just wonder if we then also need an #ifdef
> CONFIG_USB_PCI_AMD around the extern declaration?

I generally prefer not to have an #ifdef around an extern declaration
unless there is a 'static inline' version in the #else path.

Arnd