lkml.org 
[lkml]   [2011]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] EHCI : introduce a common ehci_setup
    Le Sat, 2 Jul 2011 16:35:15 -0400 (EDT),
    Alan Stern <stern@rowland.harvard.edu> a écrit :

    > On Sat, 2 Jul 2011, Matthieu CASTET wrote:
    >
    > > This allow to clean duplicated code in most of SOC driver.
    > >
    > > Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
    > > ---
    > > drivers/usb/host/ehci-hcd.c | 29 +++++++++++++++++++++++++++++
    > > 1 files changed, 29 insertions(+), 0 deletions(-)
    > >
    > > diff --git a/drivers/usb/host/ehci-hcd.c
    > > b/drivers/usb/host/ehci-hcd.c index f8030ee..f990b0f 100644
    > > --- a/drivers/usb/host/ehci-hcd.c
    > > +++ b/drivers/usb/host/ehci-hcd.c
    > > @@ -763,6 +763,35 @@ static int ehci_run (struct usb_hcd *hcd)
    > > return 0;
    > > }
    > >
    > > +static int __maybe_unused ehci_setup (struct usb_hcd *hcd)
    > > +{
    > > + struct ehci_hcd *ehci = hcd_to_ehci(hcd);
    > > + int retval;
    >
    > ...
    >
    > > +}
    > > +
    >
    > Instead of putting this routine in ehci-hcd.c, where it will silently
    > use up unnecessary codespace on thousands or millions of desktop
    > systems, why not put it into a new separate source file? Then the
    > SOC drivers can #include that file.
    Ok if you prefer that.
    But if we allow someday to built more than one
    SOC driver at a time (this will come for distribution doing generic arm
    kernel or case like [1]). How it will work ?

    Also because the function is static, the compiler will remove
    it, if it is not used. So it won't use extra codespace on desktop.


    Matthieu


    [1] http://marc.info/?l=linux-usb&m=130831671316362&w=2
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-07-03 23:05    [W:0.021 / U:89.008 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site