Skip to contentSkip to conversation

usb: host: fix implicit declaration error

PATCH In review Ansuel Smith 3 participants 5 messages Jan 18, 2020 – Jan 22, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index e729de21f..78dd0fce2 100644
@@ -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
maintainer
#1 lore raw
Quoted 8 lines · Ansuel Smith

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

Is this a new issue? What commit caused this problem?

thanks,

greg k-h

#2 lore raw

PATCH 1/1 usb: host: fix implicit declaration error

Quoted 8 lines · Ansuel Smith
Quoted 7 lines

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
Quoted 7 lines
Quoted 1 line

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.

maintainer
#3 lore raw
Quoted 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_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

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 4fbb8aa75836c3361987f431d9451aecc1830bdd and ad93562bdeecdded7d02eaaaf1aa5705ab57b1b7.
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

#4 lore raw
In reply to Ansuel Smith
Quoted 8 lines · Ansuel Smith

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

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