From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: David Cohen <david.a.cohen@linux.intel.com>
Cc: gregkh@linuxfoundation.org, balbi@ti.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: g_ffs: fix compilation warning
Date: Mon, 07 Oct 2013 00:02:02 +0200 [thread overview]
Message-ID: <5251DDDA.3070606@cogentembedded.com> (raw)
In-Reply-To: <1380925821-12848-1-git-send-email-david.a.cohen@linux.intel.com>
Hello.
On 05-10-2013 0:30, David Cohen wrote:
> If USB_FUNCTIONFS is selected without USB_FUNCTIONFS_ETH and
> USB_FUNCTIONFS_RNIS, u_ether.h won't be included and then
> USB_ETHERNET_MODULE_PARAMAETERS macro won't be available causing the
> following warning compilation:
> drivers/usb/gadget/g_ffs.c:81:1: warning: data definition has no type or
> storage class [enabled by default]
> drivers/usb/gadget/g_ffs.c:81:1: warning: type defaults to ‘int’ in
> declaration of ‘USB_ETHERNET_MODULE_PARAMETERS’ [-Wimplicit-int]
> drivers/usb/gadget/g_ffs.c:81:1: warning: function declaration isn’t a
> prototype [-Wstrict-prototypes]
> This patch fixes the warning by making USB_ETHERNET_MODULE_PARAMETERS to
> be used iff u_ether.h is included, otherwise it is not needed.
> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
> ---
> drivers/usb/gadget/g_ffs.c | 2 ++
> 1 file changed, 2 insertions(+)
> diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c
> index 5327c82..2344efe 100644
> --- a/drivers/usb/gadget/g_ffs.c
> +++ b/drivers/usb/gadget/g_ffs.c
> @@ -76,7 +76,9 @@ struct gfs_ffs_obj {
>
> USB_GADGET_COMPOSITE_OPTIONS();
>
> +#if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS
I thought the 'defined' operator requires ()?
WBR, Sergei
next prev parent reply other threads:[~2013-10-06 21:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 22:30 [PATCH v2] usb: g_ffs: fix compilation warning David Cohen
2013-10-04 22:39 ` David Cohen
2013-10-06 22:02 ` Sergei Shtylyov [this message]
2013-10-07 2:41 ` David Cohen
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=5251DDDA.3070606@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=balbi@ti.com \
--cc=david.a.cohen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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.