linux/drivers/net/wan
Julia Lawall c14ea0ca65 drivers/net/wan: Remove redundant test
arg is checked not to be NULL a few lines before.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-25 18:03:44 -08:00
..
lmc drivers/net: Kill now superfluous ->last_rx stores. 2008-11-03 21:11:17 -08:00
.gitignore
c101.c WAN: remove SCA II support from SCA drivers 2008-11-22 02:49:47 +01:00
cosa.c drivers/net: Kill now superfluous ->last_rx stores. 2008-11-03 21:11:17 -08:00
cosa.h
cycx_drv.c drivers/net: replace __FUNCTION__ with __func__ 2008-09-24 18:59:00 -04:00
cycx_main.c
cycx_x25.c netdevice wanrouter: Convert directly reference of netdev->priv 2008-11-20 04:26:21 -08:00
dlci.c netdevice: safe convert to netdev_priv() #part-3 2008-11-12 23:38:36 -08:00
dscc4.c drivers/net: Kill now superfluous ->last_rx stores. 2008-11-03 21:11:17 -08:00
farsync.c drivers/net: Kill now superfluous ->last_rx stores. 2008-11-03 21:11:17 -08:00
farsync.h WAN: farsync driver no longer uses syncppp.c directly 2008-07-23 23:00:38 +02:00
hd64570.c WAN: Correct comments in hd6457[02].c 2008-11-22 02:49:48 +01:00
hd64570.h
hd64572.c net: Remove unused netdev arg from some NAPI interfaces. 2008-12-22 20:43:12 -08:00
hd64572.h
hdlc_cisco.c WAN: cosmetic changes to generic HDLC 2008-07-23 23:00:25 +02:00
hdlc_fr.c netdevice hdlc: Convert directly reference of netdev->priv 2008-11-21 16:34:18 -08:00
hdlc_ppp.c WAN: new synchronous PPP implementation for generic HDLC. 2008-11-22 02:49:48 +01:00
hdlc_raw_eth.c WAN: cosmetic changes to generic HDLC 2008-07-23 23:00:25 +02:00
hdlc_raw.c WAN: cosmetic changes to generic HDLC 2008-07-23 23:00:25 +02:00
hdlc_x25.c wan/hdlc_x25.c: fix a NULL dereference 2008-09-24 18:49:02 -04:00
hdlc.c WAN: cosmetic changes to generic HDLC 2008-07-23 23:00:25 +02:00
hostess_sv11.c drivers/net: Kill now superfluous ->last_rx stores. 2008-11-03 21:11:17 -08:00
Kconfig netdevice pc300: Add the reason about PC300 BROKEN in Kconfig 2008-11-21 16:36:22 -08:00
lapbether.c drivers/net: Kill now superfluous ->last_rx stores. 2008-11-03 21:11:17 -08:00
Makefile WAN: new synchronous PPP implementation for generic HDLC. 2008-11-22 02:49:48 +01:00
n2.c WAN: remove SCA II support from SCA drivers 2008-11-22 02:49:47 +01:00
pc300_drv.c drivers/net/wan: Remove redundant test 2008-12-25 18:03:44 -08:00
pc300_tty.c drivers/net: replace __FUNCTION__ with __func__ 2008-09-24 18:59:00 -04:00
pc300-falc-lh.h
pc300.h WAN: Convert PC300 driver to use normal u8/u16/u32 types 2008-07-23 23:00:38 +02:00
pc300too.c WAN pc300too.c: Fix PC300-X.21 detection 2008-11-22 02:55:21 +01:00
pci200syn.c WAN: Simplify HD64572 drivers. 2008-11-22 02:49:48 +01:00
sbni.c netdevice sbni: Convert directly reference of netdev->priv 2008-11-24 14:52:16 -08:00
sbni.h sbni endian fixes 2008-01-18 14:44:33 -05:00
sdla.c netdevice: safe convert to netdev_priv() #part-3 2008-11-12 23:38:36 -08:00
sealevel.c drivers/net: Kill now superfluous ->last_rx stores. 2008-11-03 21:11:17 -08:00
wanxl.c drivers/net: Kill now superfluous ->last_rx stores. 2008-11-03 21:11:17 -08:00
wanxl.h
wanxlfw.inc_shipped
wanxlfw.S
x25_asy.c tty: driverdata and discdata are void * 2008-12-05 22:32:22 -08:00
x25_asy.h
z85230.c z85230: fix warning in drivers/net/wan/z85230.c 2008-11-25 16:53:08 -08:00
z85230.h net: Rationalise email address: Network Specific Parts 2008-10-13 19:01:08 -07:00