From: matthieu castet <castet.matthieu@free.fr>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
<linux-usb@vger.kernel.org>
Subject: Re: [PATCH 1/2] EHCI : introduce a common ehci_setup
Date: Sun, 3 Jul 2011 23:02:20 +0200 [thread overview]
Message-ID: <20110703230220.4d1e8174@mat-laptop> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1107021633160.16190-100000@netrider.rowland.org>
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
next prev parent reply other threads:[~2011-07-03 21:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-02 18:59 Matthieu CASTET
2011-07-02 18:59 ` [PATCH 2/2] ehci-msm : use ehci_setup Matthieu CASTET
2011-07-02 20:35 ` [PATCH 1/2] EHCI : introduce a common ehci_setup Alan Stern
2011-07-03 21:02 ` matthieu castet [this message]
2011-07-04 15:47 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110703230220.4d1e8174@mat-laptop \
--to=castet.matthieu@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®