From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y
Date: Mon, 08 Jun 2015 15:24:34 +0200 [thread overview]
Message-ID: <55759792.2080409@redhat.com> (raw)
In-Reply-To: <201506071505.27608.marex@denx.de>
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
next prev parent reply other threads:[~2015-06-08 13:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2015-06-08 14:04 ` Marek Vasut
2015-06-08 15:55 ` Hans de Goede
2015-06-09 0:38 ` Marek Vasut
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=55759792.2080409@redhat.com \
--to=hdegoede@redhat.com \
--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.