On Tue, 5 Oct 2010, [UTF-8] Uwe Kleine-König wrote: > Hello, > > I don't know much about usb drivers in general or ehci, but the warnings > below clutter our auto build logs since quite some time. > > Maybe someone can clearify if it's OK for the mxc driver not to use the > functions marked by my patch?! > > Best regards > Uwe > > --------------------- >8 --------------------- > - ehci_lpm_check and ehci_lpm_set_da are only used in ehci_update_device > defined in drivers/usb/host/ehci-pci.c. > - ehci_adjust_port_wakeup_flags (disguised as > ehci_prepare_ports_for_controller_suspend and > ehci_prepare_ports_for_controller_resume), ehci_clear_tt_buffer_complete > and ehci_endpoint_reset are used in several drivers, but not in ehci-mxc.c > > This fixes the following warnings: > > drivers/usb/host/ehci-lpm.c:21: warning: 'ehci_lpm_set_da' defined but not used > drivers/usb/host/ehci-lpm.c:41: warning: 'ehci_lpm_check' defined but not used > drivers/usb/host/ehci-q.c:148: warning: 'ehci_clear_tt_buffer_complete' defined but not used > drivers/usb/host/ehci-hcd.c:1088: warning: 'ehci_endpoint_reset' defined but not used > drivers/usb/host/ehci-hub.c:111: warning: 'ehci_adjust_port_wakeup_flags' defined but not used > > when compiling with USB_EHCI_MXC. I have no idea about ehci_lpm_check or ehci_lpm_set_da. From a cursory inspection, it appears that this file should be included only in builds where it gets used (currently only in PCI). ehci_adjust_port_wakeup_flags should be used in every driver that supports suspend & resume. But since your driver doesn't, marking them __maybe_unused is okay. ehci_clear_tt_buffer_complete and ehci_endpoint_reset must be used by every EHCI driver. The correct fix is to add them to your driver's hc_driver structure. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html