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]
Date:	Sun, 02 Sep 2007 22:24:19 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Satyam Sharma <satyam@...radead.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	John Linville <linville@...driver.com>,
	linux-wireless@...r.kernel.org
Subject: Re: [PATCH -mm] net/wireless/sysfs.c: Shut up build warning

On Mon, 2007-09-03 at 01:41 +0530, Satyam Sharma wrote:
> net/wireless/sysfs.c:108: warning: ‘wiphy_uevent’ defined but not used
> 
> when CONFIG_HOTPLUG=n is because the only usage site of this function
> is #ifdef'ed as such, so let's #ifdef the definition also.
> 
> Signed-off-by: Satyam Sharma <satyam@...radead.org>

Looks good to me. The new style seems to be to do
#ifdef SOMETHING
code
#else
#define wiphy_uevent NULL
#endif

and then using it unconditionally, but I'm fine with both.

Acked-by: Johannes Berg <johannes@...solutions.net>

> ---
> 
>  net/wireless/sysfs.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-2.6.23-rc4-mm1/net/wireless/sysfs.c‾fix	2007-09-02 20:06:11.000000000 +0530
> +++ linux-2.6.23-rc4-mm1/net/wireless/sysfs.c	2007-09-02 20:07:01.000000000 +0530
> @@ -104,11 +104,13 @@ static void wiphy_dev_release(struct dev
>  	cfg80211_dev_free(rdev);
>  }
>  
> +#ifdef CONFIG_HOTPLUG
>  static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env)
>  {
>  	/* TODO, we probably need stuff here */
>  	return 0;
>  }
> +#endif
>  
>  struct class ieee80211_class = {
>  	.name = "ieee80211",

Download attachment "signature.asc" of type "application/pgp-signature" (191 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ