From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: xhci: add struct devrequest declaration
Date: Thu, 12 May 2016 13:42:00 +0200 [thread overview]
Message-ID: <57346C08.9070903@denx.de> (raw)
In-Reply-To: <CAK7LNARtUC21fCM=vjvoGP952fNu54XAOW741Ho6DXy_bBcy7g@mail.gmail.com>
On 05/12/2016 05:36 AM, Masahiro Yamada wrote:
> Hi Marek,
>
>
> 2016-05-11 20:22 GMT+09:00 Marek Vasut <marex@denx.de>:
>
>>>> Because you want to have definition of every symbol you use in your
>>>> headers when you include that header. I am not a big fan of huge stack
>>>> of #include statements in a driver.
>>>
>>> Agree. That's why this patch is here.
>>>
>>> See this patch.
>>> http://patchwork.ozlabs.org/patch/620989/
>>>
>>>
>>> xhci-dwc3.c needs to include xhci.h, but not usb.h
>>> because this driver just wants to register the xHCI controller.
>>> It need not know complicated USB protocol things in the first place.
>>
>> In that case, shouldn't the xhci_register() be in xhci.h instead ?
>
> Ah, right.
>
> That will make APIs clearer, but I cannot touch it
> because I do not have either time or skill to refactor it.
Ha, ok.
>>> Your way adds #include <include/usb.h> to xhci.h,
>>> so xhci-dwc3.c is compelled to include unnecessary usb.h
>>>
>>> It means huge stack of includes you do not like, isn't it?
>>
>> It does add possibly unused symbols to the namespace, yes.
>> I don't think I really mind this though, since the symbol
>> definition is available when I include xhci.h somewhere.
>
> Right.
>
> But, what I can tell at least is that
> it would make the compiler to parse additional headers for nothing.
Right.
--
Best regards,
Marek Vasut
prev parent reply other threads:[~2016-05-12 11:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 10:36 [U-Boot] [PATCH] usb: xhci: add struct devrequest declaration Masahiro Yamada
2016-05-06 10:50 ` Marek Vasut
2016-05-06 11:31 ` Masahiro Yamada
2016-05-06 16:40 ` Marek Vasut
2016-05-11 11:03 ` Masahiro Yamada
2016-05-11 11:22 ` Marek Vasut
2016-05-12 3:36 ` Masahiro Yamada
2016-05-12 11:42 ` Marek Vasut [this message]
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=57346C08.9070903@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.