2007-09-17 22:42:31

by Satyam Sharma

[permalink] [raw]
Subject: [PATCH -mm][resend] net/wireless/sysfs.c: Shut up build warning


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 <[email protected]>
Acked-by: Johannes Berg <[email protected]>

---

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


2007-09-17 23:41:50

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH -mm][resend] net/wireless/sysfs.c: Shut up build warning

On Tue, Sep 18, 2007 at 04:15:11AM +0530, Satyam Sharma wrote:
>=20
> net/wireless/sysfs.c:108: warning: =E2=80=98wiphy_uevent=E2=80=99 def=
ined but not used
>=20
> when CONFIG_HOTPLUG=3Dn is because the only usage site of this functi=
on
> is #ifdef'ed as such, so let's #ifdef the definition also.
>=20
> Signed-off-by: Satyam Sharma <[email protected]>
> Acked-by: Johannes Berg <[email protected]>

This has already been sent upstream through Dave Miller's net-2.6.24
tree...

John
--=20
John W. Linville
[email protected]