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] [day] [month] [year] [list]
Message-ID: <20150125115237.GA12221@kroah.com>
Date:	Sun, 25 Jan 2015 19:52:37 +0800
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Murilo Opsfelder Araujo <mopsfelder@...il.com>
Cc:	linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Subject: Re: [PATCH] staging: rtl8192u: r8192U_core: Fix compile issue when
 CONFIG_WIRELESS_EXT is not defined

On Sat, Jan 24, 2015 at 05:11:42PM -0200, Murilo Opsfelder Araujo wrote:
> This patch gets rid of the following error when compiling r8192U_core.c
> and CONFIG_WIRELESS_EXT is not defined:
> 
> drivers/staging/rtl8192u/r8192U_core.c: In function ‘rtl8192_usb_probe’:
> drivers/staging/rtl8192u/r8192U_core.c:4697:5: error: ‘struct net_device’ has no member named ‘wireless_handlers’
>   dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def;
>      ^
> 
> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@...il.com>
> ---
>  drivers/staging/rtl8192u/r8192U_core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index e031a25..396a11f 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -4694,7 +4694,9 @@ static int rtl8192_usb_probe(struct usb_interface *intf,
>  
>  	dev->netdev_ops = &rtl8192_netdev_ops;
>  
> +#ifdef CONFIG_WIRELESS_EXT
>  	dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def;
> +#endif

It's almost never correct to put a #ifdef in a .c file, so what is going
on here?  How do other drivers handle this in a more "proper" way?

Is this something new?  Should this driver just depend on this Kconfig
option?

I can't take this as-is, sorry.

greg k-h
--
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