Hi Marek,
2016-05-11 20:22 GMT+09:00 Marek Vasut <ma...@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. >> 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. -- Best Regards Masahiro Yamada _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot