On Tue, 5 Oct 2010, Uwe Kleine-König wrote: > On Tue, Oct 05, 2010 at 10:17:21AM -0400, Alan Stern wrote: > > On Tue, 5 Oct 2010, [UTF-8] Uwe Kleine-König wrote: > This is not the usual way to mark utf-8 data in an latin1 mail. At > least mutt/vim don't recognize it :-) You are undoubtedly correct. I use a really old email client, and it's not at all surprising to hear that it does some things incorrectly. > > > - 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. > OK. > > > 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. > Hmm, if all drivers must have this, why does this callback exist at all? All _EHCI_ drivers. Other drivers don't have them. > /me continues to dig around ... > Hmm, usb_hcd_reset_endpoint seems handle .endpoint_reset being NULL. That's for backward compatibility. I figured it was better to operate in a degraded mode than to crash with a NULL pointer exception. :-) > And hub_tt_work checks .clear_tt_buffer_complete for being non-NULL > before calling it, too. > > ?? Ditto. If you find any other EHCI drivers that don't have both callbacks defined, feel free to submit patches adding the appropriate entries. 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