lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5251DDDA.3070606@cogentembedded.com>
Date:	Mon, 07 Oct 2013 00:02:02 +0200
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	David Cohen <david.a.cohen@...ux.intel.com>
CC:	gregkh@...uxfoundation.org, balbi@...com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] usb: g_ffs: fix compilation warning

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@...ux.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ