drivers/net/wireless: correct error-handling code
PATCH 5/9 drivers/net/wireless: correct error-handling code
From: Julia Lawall <[email protected]>
iwm_wdev_alloc returns an ERR_PTR value in an error case instead of NULL.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@match exists@
expression x, E;
statement S1, S2;
@@
x = iwm_wdev_alloc(...)
... when != x = E
(
* if (x = NULL || ...) S1 else S2
|
* if (x = NULL && ...) S1 else S2
)
// </smpl>
--- drivers/net/wireless/iwmc3200wifi/netdev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/iwmc3200wifi/netdev.c +1 -1
@@ -99,7 +99,7 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev,int ret =0 ; wdev =iwm_wdev_alloc (sizeof_bus, dev); -if (!wdev) { +if (IS_ERR (wdev)) {dev_err (dev,"no memory for wireless device instance\n" );return ERR_PTR (-ENOMEM ); }
David Miller
maintainerFrom: Julia Lawall <[email protected]>
Date: Tue, 28 Jul 2009 17:54:24 +0200 (CEST)
Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up. Added...
Quoted 46 lines
From: Julia Lawall <[email protected]>
iwm_wdev_allocreturns anERR_PTRvalue in an error case instead of NULL.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)// <smpl>
@match exists@
expression x, E;
statement S1, S2;
@@x =
iwm_wdev_alloc(...)
... when != x = E
(
* if (x == NULL || ...) S1 else S2
|
* if (x == NULL && ...) S1 else S2
)
// </smpl>Signed-off-by Julia Lawall <[email protected]>--- drivers/net/wireless/iwmc3200wifi/netdev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/wireless/iwmc3200wifi/netdev.c +1
-2@@ -99,7 +99,7 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev,int ret =0 ; wdev =iwm_wdev_alloc (sizeof_bus, dev); -if (!wdev) { +if (IS_ERR (wdev)) {dev_err (dev,"no memory for wireless device instance\n" );return ERR_PTR (-ENOMEM ); } --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines · David Miller
From: Julia Lawall <[email protected]>
Date: Tue, 28 Jul 2009 17:54:24 +0200 (CEST)Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up. Added...
Thanks...FWIW, I've got a nearly identical patch from Dan Carpenter queued already.
John
Signature · 7 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready. ¡Viva Honduras Libre! -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/1 MAINTAINERS: Add networking wireless drivers section
In reply to David MillerQuoted 2 lines · David Miller
Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up
MAINTAINERS +6 -0
@@ -4186,6 +4186,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git S: Odd Fixes F: drivers/net/ +NETWORKING WIRELESS DRIVERS +L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git +S: Odd Fixes +F: drivers/net/wireless/ + NETXEN (1/10) GbE SUPPORT P: Dhananjay Phadke M: [email protected]
Re: [PATCH] MAINTAINERS: Add networking wireless drivers section
Quoted 11 lines · On Tue, 28 Jul 2009 11:06:37 -0700 Joe Perches wrote:
Quoted 2 lines · David Miller
Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up
Signed-off-by Joe Perches <[email protected]>MAINTAINERS +0
-0
MAINTAINERS T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git · line 4194
Quoted 9 lines
MAINTAINERS +6
-0@@ -4186,6 +4186,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git S: Odd Fixes F: drivers/net/ +NETWORKING WIRELESS DRIVERS +L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git +S: Odd Fixes +F: drivers/net/wireless/ +
Already have this:
NETWORKING [WIRELESS]
P: John W. Linville
M: [email protected]
L: [email protected]
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
S: Maintained
F: net/wireless/
F: include/net/ieee80211*
F: include/linux/wireless.h
---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
Re: [PATCH] MAINTAINERS: Add networking wireless drivers section
Quoted 22 lines · Randy Dunlap
Quoted 9 lines · On Tue, 28 Jul 2009 11:06:37 -0700 Joe Perches wrote:
Quoted 2 lines · David Miller
Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up
Signed-off-by Joe Perches <[email protected]>MAINTAINERS +0
-0MAINTAINERS T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git · line 4194
Quoted 9 lines
MAINTAINERS +6
-0@@ -4186,6 +4186,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git S: Odd Fixes F: drivers/net/ +NETWORKING WIRELESS DRIVERS +L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git +S: Odd Fixes +F: drivers/net/wireless/ +Already have this:
Quoted 9 lines
NETWORKING [WIRELESS]
P: John W. Linville
M: [email protected]
L: [email protected]
T: gitgit://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
S: Maintained
F:net/wireless/
F:include/net/ieee80211*
F:include/linux/wireless.h
That section does not include drivers/net/wireless/
I believe John Linville isn't maintaining all the wireless drivers, he's acting as a gatekeeper in a similar role as DavidM for drivers/net/.
The patch above means scripts/get_maintainer.pl can use the linux-wireless@vger list email address for any change in driver/net/wireless/
David Miller
maintainerRe: [PATCH] MAINTAINERS: Add networking wireless drivers section
From: Joe Perches <[email protected]>
Date: Tue, 28 Jul 2009 11:27:07 -0700
Quoted 33 lines · Randy Dunlap
Quoted 22 lines · On Tue, 28 Jul 2009 11:06:37 -0700 Joe Perches wrote:
Quoted 9 lines · David Miller
Quoted 2 lines
Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up
Signed-off-by Joe Perches <[email protected]>MAINTAINERS +0
-0MAINTAINERS T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git · line 4194
Quoted 9 lines
MAINTAINERS +6
-0@@ -4186,6 +4186,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git S: Odd Fixes F: drivers/net/ +NETWORKING WIRELESS DRIVERS +L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git +S: Odd Fixes +F: drivers/net/wireless/ +Already have this:
Quoted 9 lines
NETWORKING [WIRELESS]
P: John W. Linville
M: [email protected]
L: [email protected]
T: gitgit://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
S: Maintained
F:net/wireless/
F:include/net/ieee80211*
F:include/linux/wireless.h
Quoted 1 line
That section does not include
drivers/net/wireless/
So just add it.
Quoted 3 lines
I believe John Linville isn't maintaining all the
wireless drivers, he's acting as a gatekeeper in
a similar role as DavidM fordrivers/net/.
It still needs to hit his inbox and linux-wireless regardless.
David Miller
maintainerRe: [PATCH] MAINTAINERS: Add networking wireless drivers section
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
Date: Tue, 28 Jul 2009 11:06:37 -0700
Quoted 5 lines · David Miller
Quoted 2 lines
Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up
Signed-off-by Joe Perches <[email protected]>
Why not just create a plain "WIRELESS" umbrella entry that contains all of drivers/net/wireless, net/mac80211, and net/wireless?
Re: [PATCH] MAINTAINERS: Add networking wireless drivers section
Quoted 4 lines · David Miller
From: Joe Perches <[email protected]>
Date: Tue, 28 Jul 2009 11:06:37 -0700Quoted 1 line · David Miller
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up
Signed-off-by Joe Perches <[email protected]>Why not just create a plain "WIRELESS" umbrella entry that contains all of
drivers/net/wireless, net/mac80211, and net/wireless?
Whatever works for John I suppose.
John, do you have a preference?
I was trying to avoid the "S: Maintained" label
and was copying the form of this section:
NETWORKING DRIVERS
L: [email protected]
W: http://www.linuxfoundation.org/en/Net
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
S: Odd Fixes
F: drivers/net/
Re: [PATCH] MAINTAINERS: Add networking wireless drivers section
Quoted 6 lines · Joe Perches
Quoted 2 lines
Why not just create a plain "WIRELESS" umbrella entry that contains all of
drivers/net/wireless, net/mac80211, and net/wireless?Whatever works for John I suppose. John, do you have a preference? I was trying to avoid the "S: Maintained" label
and was copying the form of this section:
Quoted 6 lines
NETWORKING DRIVERS
L: [email protected]
W: http://www.linuxfoundation.org/en/Net
T: gitgit://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
S: Odd Fixes
F:drivers/net/
Just out of curiosity, why is drivers/net marked as "Odd fixes" and not "Maintained"?
Signature · 2 lines
Jiri Kosina SUSE Labs
David Miller
maintainerRe: [PATCH] MAINTAINERS: Add networking wireless drivers section
From: Jiri Kosina <[email protected]>
Date: Tue, 11 Aug 2009 15:55:46 +0200 (CEST)
Quoted 15 lines · Joe Perches
Quoted 7 lines
Quoted 3 lines
Why not just create a plain "WIRELESS" umbrella entry that contains all of
drivers/net/wireless, net/mac80211, and net/wireless?Whatever works for John I suppose. John, do you have a preference? I was trying to avoid the "S: Maintained" label
and was copying the form of this section:Quoted 6 lines
NETWORKING DRIVERS
L: [email protected]
W: http://www.linuxfoundation.org/en/Net
T: gitgit://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
S: Odd Fixes
F:drivers/net/
Quoted 2 lines
Just out of curiosity, why is
drivers/netmarked as "Odd fixes" and not "Maintained"?
Because it depends upon the individual driver maintainers. For example, I don't think one could claim 3c515.c or other ISA ethernet drivers to be in any kind of "Maintained" state.
Johannes Berg
maintainerRe: [PATCH] MAINTAINERS: Add networking wireless drivers section
In reply to David MillerQuoted 4 lines · David Miller
From: Joe Perches <[email protected]>
Date: Tue, 28 Jul 2009 11:06:37 -0700Quoted 1 line · David Miller
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Wireless patches need to be CC:'d to linux-wireless so that John Linville can notice and pick them up
Signed-off-by Joe Perches <[email protected]>Why not just create a plain "WIRELESS" umbrella entry that contains all of
drivers/net/wireless, net/mac80211, and net/wireless?
I'll happily maintain net/mac80211 and net/wireless, but won't be touching all the old crappy drivers/net/wireless with a long stick.
johannes