* [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y @ 2015-06-06 8:21 Hans de Goede 2015-06-07 13:05 ` Marek Vasut 0 siblings, 1 reply; 6+ messages in thread From: Hans de Goede @ 2015-06-06 8:21 UTC (permalink / raw) To: u-boot When CONFIG_DM_USB=y the various usb functions are available regardless of any controller drivers being enabled, so always the usb function prototypes when CONFIG_DM_USB=y. This fixes compile warnings due to missing prototypes on ARCHs where the ARCH Kconfig always enables CONFIG_DM_USB and various usb drivers. One could argue that in the case of no controllers CONFIG_DM_USB should not be set, but this problem is typically seen during bringup of boards which do actually have usb controllers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- include/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/usb.h b/include/usb.h index c709ce2..54ad33a 100644 --- a/include/usb.h +++ b/include/usb.h @@ -180,7 +180,7 @@ enum usb_init_type { defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \ defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_MUSB_SUNXI) || \ defined(CONFIG_USB_XHCI) || defined(CONFIG_USB_DWC2) || \ - defined(CONFIG_USB_EMUL) + defined(CONFIG_USB_EMUL) || defined(CONFIG_DM_USB) int usb_lowlevel_init(int index, enum usb_init_type init, void **controller); int usb_lowlevel_stop(int index); -- 2.4.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y 2015-06-06 8:21 [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y Hans de Goede @ 2015-06-07 13:05 ` Marek Vasut 2015-06-08 13:24 ` Hans de Goede 0 siblings, 1 reply; 6+ messages in thread From: Marek Vasut @ 2015-06-07 13:05 UTC (permalink / raw) To: u-boot On Saturday, June 06, 2015 at 10:21:22 AM, Hans de Goede wrote: > When CONFIG_DM_USB=y the various usb functions are available regardless of > any controller drivers being enabled, so always the usb function prototypes > when CONFIG_DM_USB=y. > > This fixes compile warnings due to missing prototypes on ARCHs where > the ARCH Kconfig always enables CONFIG_DM_USB and various usb drivers. > > One could argue that in the case of no controllers CONFIG_DM_USB should not > be set, but this problem is typically seen during bringup of boards which > do actually have usb controllers. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > --- > include/usb.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/usb.h b/include/usb.h > index c709ce2..54ad33a 100644 > --- a/include/usb.h > +++ b/include/usb.h > @@ -180,7 +180,7 @@ enum usb_init_type { > defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \ > defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_MUSB_SUNXI) || \ > defined(CONFIG_USB_XHCI) || defined(CONFIG_USB_DWC2) || \ > - defined(CONFIG_USB_EMUL) > + defined(CONFIG_USB_EMUL) || defined(CONFIG_DM_USB) What would happen in case we instead dropped this horrible ifdef altogether, do you think it'd break anything ? > int usb_lowlevel_init(int index, enum usb_init_type init, void > **controller); int usb_lowlevel_stop(int index); Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y 2015-06-07 13:05 ` Marek Vasut @ 2015-06-08 13:24 ` Hans de Goede 2015-06-08 14:04 ` Marek Vasut 0 siblings, 1 reply; 6+ messages in thread From: Hans de Goede @ 2015-06-08 13:24 UTC (permalink / raw) To: u-boot Hi, On 07-06-15 15:05, Marek Vasut wrote: > On Saturday, June 06, 2015 at 10:21:22 AM, Hans de Goede wrote: >> When CONFIG_DM_USB=y the various usb functions are available regardless of >> any controller drivers being enabled, so always the usb function prototypes >> when CONFIG_DM_USB=y. >> >> This fixes compile warnings due to missing prototypes on ARCHs where >> the ARCH Kconfig always enables CONFIG_DM_USB and various usb drivers. >> >> One could argue that in the case of no controllers CONFIG_DM_USB should not >> be set, but this problem is typically seen during bringup of boards which >> do actually have usb controllers. >> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com> >> --- >> include/usb.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/usb.h b/include/usb.h >> index c709ce2..54ad33a 100644 >> --- a/include/usb.h >> +++ b/include/usb.h >> @@ -180,7 +180,7 @@ enum usb_init_type { >> defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \ >> defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_MUSB_SUNXI) || > \ >> defined(CONFIG_USB_XHCI) || defined(CONFIG_USB_DWC2) || \ >> - defined(CONFIG_USB_EMUL) >> + defined(CONFIG_USB_EMUL) || defined(CONFIG_DM_USB) > > What would happen in case we instead dropped this horrible ifdef altogether, > do you think it'd break anything ? I've not audited the code, but I believe that it only declares a bunch of function prototypes, so I think that dropping the entire #ifdef is fine. Regards, Hans ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y 2015-06-08 13:24 ` Hans de Goede @ 2015-06-08 14:04 ` Marek Vasut 2015-06-08 15:55 ` Hans de Goede 0 siblings, 1 reply; 6+ messages in thread From: Marek Vasut @ 2015-06-08 14:04 UTC (permalink / raw) To: u-boot On Monday, June 08, 2015 at 03:24:34 PM, Hans de Goede wrote: > Hi, > > On 07-06-15 15:05, Marek Vasut wrote: > > On Saturday, June 06, 2015 at 10:21:22 AM, Hans de Goede wrote: > >> When CONFIG_DM_USB=y the various usb functions are available regardless > >> of any controller drivers being enabled, so always the usb function > >> prototypes when CONFIG_DM_USB=y. > >> > >> This fixes compile warnings due to missing prototypes on ARCHs where > >> the ARCH Kconfig always enables CONFIG_DM_USB and various usb drivers. > >> > >> One could argue that in the case of no controllers CONFIG_DM_USB should > >> not be set, but this problem is typically seen during bringup of boards > >> which do actually have usb controllers. > >> > >> Signed-off-by: Hans de Goede <hdegoede@redhat.com> > >> --- > >> > >> include/usb.h | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/include/usb.h b/include/usb.h > >> index c709ce2..54ad33a 100644 > >> --- a/include/usb.h > >> +++ b/include/usb.h > >> @@ -180,7 +180,7 @@ enum usb_init_type { > >> > >> defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \ > >> defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_MUSB_SUNXI) > >> || > > > > \ > > > >> defined(CONFIG_USB_XHCI) || defined(CONFIG_USB_DWC2) || \ > >> > >> - defined(CONFIG_USB_EMUL) > >> + defined(CONFIG_USB_EMUL) || defined(CONFIG_DM_USB) > > > > What would happen in case we instead dropped this horrible ifdef > > altogether, do you think it'd break anything ? > > I've not audited the code, but I believe that it only declares a bunch > of function prototypes, so I think that dropping the entire #ifdef is > fine. So do I :) Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y 2015-06-08 14:04 ` Marek Vasut @ 2015-06-08 15:55 ` Hans de Goede 2015-06-09 0:38 ` Marek Vasut 0 siblings, 1 reply; 6+ messages in thread From: Hans de Goede @ 2015-06-08 15:55 UTC (permalink / raw) To: u-boot Hi, On 08-06-15 16:04, Marek Vasut wrote: > On Monday, June 08, 2015 at 03:24:34 PM, Hans de Goede wrote: >> Hi, >> >> On 07-06-15 15:05, Marek Vasut wrote: >>> On Saturday, June 06, 2015 at 10:21:22 AM, Hans de Goede wrote: >>>> When CONFIG_DM_USB=y the various usb functions are available regardless >>>> of any controller drivers being enabled, so always the usb function >>>> prototypes when CONFIG_DM_USB=y. >>>> >>>> This fixes compile warnings due to missing prototypes on ARCHs where >>>> the ARCH Kconfig always enables CONFIG_DM_USB and various usb drivers. >>>> >>>> One could argue that in the case of no controllers CONFIG_DM_USB should >>>> not be set, but this problem is typically seen during bringup of boards >>>> which do actually have usb controllers. >>>> >>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com> >>>> --- >>>> >>>> include/usb.h | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/include/usb.h b/include/usb.h >>>> index c709ce2..54ad33a 100644 >>>> --- a/include/usb.h >>>> +++ b/include/usb.h >>>> @@ -180,7 +180,7 @@ enum usb_init_type { >>>> >>>> defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \ >>>> defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_MUSB_SUNXI) >>>> || >>> >>> \ >>> >>>> defined(CONFIG_USB_XHCI) || defined(CONFIG_USB_DWC2) || \ >>>> >>>> - defined(CONFIG_USB_EMUL) >>>> + defined(CONFIG_USB_EMUL) || defined(CONFIG_DM_USB) >>> >>> What would happen in case we instead dropped this horrible ifdef >>> altogether, do you think it'd break anything ? >> >> I've not audited the code, but I believe that it only declares a bunch >> of function prototypes, so I think that dropping the entire #ifdef is >> fine. > > So do I :) I was actually hoping that you would do it :) Regards, Hans ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y 2015-06-08 15:55 ` Hans de Goede @ 2015-06-09 0:38 ` Marek Vasut 0 siblings, 0 replies; 6+ messages in thread From: Marek Vasut @ 2015-06-09 0:38 UTC (permalink / raw) To: u-boot On Monday, June 08, 2015 at 05:55:31 PM, Hans de Goede wrote: > Hi, > > On 08-06-15 16:04, Marek Vasut wrote: > > On Monday, June 08, 2015 at 03:24:34 PM, Hans de Goede wrote: > >> Hi, > >> > >> On 07-06-15 15:05, Marek Vasut wrote: > >>> On Saturday, June 06, 2015 at 10:21:22 AM, Hans de Goede wrote: > >>>> When CONFIG_DM_USB=y the various usb functions are available > >>>> regardless of any controller drivers being enabled, so always the usb > >>>> function prototypes when CONFIG_DM_USB=y. > >>>> > >>>> This fixes compile warnings due to missing prototypes on ARCHs where > >>>> the ARCH Kconfig always enables CONFIG_DM_USB and various usb drivers. > >>>> > >>>> One could argue that in the case of no controllers CONFIG_DM_USB > >>>> should not be set, but this problem is typically seen during bringup > >>>> of boards which do actually have usb controllers. > >>>> > >>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com> > >>>> --- > >>>> > >>>> include/usb.h | 2 +- > >>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>>> > >>>> diff --git a/include/usb.h b/include/usb.h > >>>> index c709ce2..54ad33a 100644 > >>>> --- a/include/usb.h > >>>> +++ b/include/usb.h > >>>> @@ -180,7 +180,7 @@ enum usb_init_type { > >>>> > >>>> defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || > >>>> \ defined(CONFIG_USB_MUSB_OMAP2PLUS) || > >>>> defined(CONFIG_USB_MUSB_SUNXI) > >>> > >>> \ > >>> > >>>> defined(CONFIG_USB_XHCI) || defined(CONFIG_USB_DWC2) || \ > >>>> > >>>> - defined(CONFIG_USB_EMUL) > >>>> + defined(CONFIG_USB_EMUL) || defined(CONFIG_DM_USB) > >>> > >>> What would happen in case we instead dropped this horrible ifdef > >>> altogether, do you think it'd break anything ? > >> > >> I've not audited the code, but I believe that it only declares a bunch > >> of function prototypes, so I think that dropping the entire #ifdef is > >> fine. > > > > So do I :) > > I was actually hoping that you would do it :) So V2 is coming ? :) Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-09 0:38 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-06 8:21 [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y Hans de Goede 2015-06-07 13:05 ` Marek Vasut 2015-06-08 13:24 ` Hans de Goede 2015-06-08 14:04 ` Marek Vasut 2015-06-08 15:55 ` Hans de Goede 2015-06-09 0:38 ` Marek Vasut
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox