usb: host: fix implicit declaration error
Subsystems (2)
PATCH 1/1 usb: host: fix implicit declaration error
If USB_PCI is not enabled, this error is triggered. drivers/usb/host/ehci-pci.c:152:7:
error: implicit declaration of function 'usb_amd_quirk_pll_check';
152 | if (usb_amd_quirk_pll_check())
| ^~~~~~~~~~~~~~~~~~~~~~~
| usb_amd_quirk_pll_enable--- drivers/usb/host/pci-quirks.h | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/host/pci-quirks.h +4 -0
@@ -29,6 +29,10 @@ static inline bool usb_amd_pt_check_port(struct device *device, int port) {return false; } +static inline bool usb_amd_quirk_pll_check (void ) +{ +return false; +}#endif /* CONFIG_USB_PCI */ #endif /* __LINUX_USB_PCI_QUIRKS_H */
Signature · 1 line
2.24.0
Greg KH
maintainerQuoted 8 lines · Ansuel Smith
If
USB_PCIis not enabled, this error is triggered.drivers/usb/host/ehci-pci.c:152:7:
error: implicit declaration of function 'usb_amd_quirk_pll_check';152 | if (usb_amd_quirk_pll_check()) | ^~~~~~~~~~~~~~~~~~~~~~~ | usb_amd_quirk_pll_enableSigned-off-by Ansuel Smith <[email protected]>
Is this a new issue? What commit caused this problem?
thanks,
greg k-h
PATCH 1/1 usb: host: fix implicit declaration error
Quoted 8 lines · Ansuel Smith
Quoted 7 lines
If
USB_PCIis not enabled, this error is triggered.drivers/usb/host/ehci-pci.c:152:7:
error: implicit declaration of function 'usb_amd_quirk_pll_check';152 | if (usb_amd_quirk_pll_check()) | ^~~~~~~~~~~~~~~~~~~~~~~ | usb_amd_quirk_pll_enable
Quoted 7 lines
Quoted 1 line
Signed-off-by Ansuel Smith <[email protected]>Is this a new issue? What commit caused this problem?
thanks,
greg k-h
Looks like this is caused by 4fbb8aa75836c3361987f431d9451aecc1830bdd and ad93562bdeecdded7d02eaaaf1aa5705ab57b1b7.
Looks like it was never added to the header file else condition.
'Greg KH'
maintainerQuoted 12 lines · On Sun, Jan 19, 2020 at 02:19:45PM +0100, [email protected] wrote:
Quoted 12 lines · Ansuel Smith
Quoted 8 lines
If
USB_PCIis not enabled, this error is triggered.drivers/usb/host/ehci-pci.c:152:7:
error: implicit declaration of function 'usb_amd_quirk_pll_check';152 | if (usb_amd_quirk_pll_check()) | ^~~~~~~~~~~~~~~~~~~~~~~ | usb_amd_quirk_pll_enableSigned-off-by Ansuel Smith <[email protected]>Is this a new issue? What commit caused this problem?
Quoted 8 lines
Quoted 3 lines
thanks,
greg k-h
Looks like this is caused by
4fbb8aa75836c3361987f431d9451aecc1830bddandad93562bdeecdded7d02eaaaf1aa5705ab57b1b7.
Looks like it was never added to the header file else condition.
So this has been a problem since 2011? What config actually causes this build problem to occur?
thanks,
greg k-h
Quoted 8 lines · Ansuel Smith
If
USB_PCIis not enabled, this error is triggered.drivers/usb/host/ehci-pci.c:152:7:
error: implicit declaration of function 'usb_amd_quirk_pll_check';152 | if (usb_amd_quirk_pll_check()) | ^~~~~~~~~~~~~~~~~~~~~~~ | usb_amd_quirk_pll_enableSigned-off-by Ansuel Smith <[email protected]>
I'm a little confused by this. ehci-pci.c doesn't get compiled unless CONFIG_USB_EHCI_PCI is set, and that symbol depends on CONFIG_USB_PCI. So how can this situation ever occur?
Alan Stern