Re: [PATCH] [RFC] USB: EHCI: mark several functions as maybe unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :-)
 
> > - 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?
/me continues to dig around ...
Hmm, usb_hcd_reset_endpoint seems handle .endpoint_reset being NULL.
And hub_tt_work checks .clear_tt_buffer_complete for being non-NULL
before calling it, too.

??

Best regards
Uwe
 
-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux