Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH -mm] net/wireless/sysfs.c: Shut up build warning
       [not found] ` <alpine.LFD.0.999.0709022344550.27844@enigma.security.iitk.ac.in>
@ 2007-09-02 20:11   ` Satyam Sharma
  2007-09-02 20:24     ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Satyam Sharma @ 2007-09-02 20:11 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: John Linville, Johannes Berg, linux-wireless

[-- Attachment #1: Type: TEXT/PLAIN, Size: 827 bytes --]


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@infradead.org>

---

 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",

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -mm] net/wireless/sysfs.c: Shut up build warning
  2007-09-02 20:11   ` [PATCH -mm] net/wireless/sysfs.c: Shut up build warning Satyam Sharma
@ 2007-09-02 20:24     ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2007-09-02 20:24 UTC (permalink / raw)
  To: Satyam Sharma; +Cc: Linux Kernel Mailing List, John Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

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@infradead.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@sipsolutions.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",

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-02 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.LFD.0.999.0709022344550.27844@enigma.security.iitk.ac.i n>
     [not found] ` <alpine.LFD.0.999.0709022344550.27844@enigma.security.iitk.ac.in>
2007-09-02 20:11   ` [PATCH -mm] net/wireless/sysfs.c: Shut up build warning Satyam Sharma
2007-09-02 20:24     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox