android_kernel_xiaomi_sm8350/drivers/s390/net
Julia Lawall acfa922c5a [S390] s390: Remove redundant test
The loop above the modified code only terminates when rc is a valid pointer.

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: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:17 +01:00
..
claw.c s390: claw compile fixlet 2008-10-13 18:48:43 -07:00
claw.h [S390] bus_id -> dev_name conversions 2008-10-10 21:33:49 +02:00
ctcm_dbug.c s390/net/ctcm: message cleanup 2008-07-22 17:53:46 -04:00
ctcm_dbug.h s390/net/ctcm: message cleanup 2008-07-22 17:53:46 -04:00
ctcm_fsms.c ctcm: netdev->priv vs. netdev->ml_priv 2008-08-27 05:17:52 -04:00
ctcm_fsms.h
ctcm_main.c [S390] more bus_id -> dev_name conversions 2008-10-10 21:33:50 +02:00
ctcm_main.h [S390] bus_id -> dev_name conversions 2008-10-10 21:33:49 +02:00
ctcm_mpc.c misc: replace __FUNCTION__ with __func__ 2008-10-16 11:21:30 -07:00
ctcm_mpc.h s390/net/ctcm: message cleanup 2008-07-22 17:53:46 -04:00
ctcm_sysfs.c
cu3088.c [S390] Remove P390 support. 2008-07-14 10:02:25 +02:00
cu3088.h [S390] Remove P390 support. 2008-07-14 10:02:25 +02:00
fsm.c
fsm.h
Kconfig
lcs.c [S390] bus_id -> dev_name conversions 2008-10-10 21:33:49 +02:00
lcs.h
Makefile
netiucv.c [S390] bus_id -> dev_set_name() changes 2008-10-10 21:33:50 +02:00
qeth_core_main.c [S390] s390: Remove redundant test 2008-12-25 13:39:17 +01:00
qeth_core_mpc.c
qeth_core_mpc.h
qeth_core_offl.c
qeth_core_offl.h
qeth_core_sys.c
qeth_core.h [S390] service level interface. 2008-12-25 13:39:00 +01:00
qeth_l2_main.c qeth: avoid skb_under_panic for malformatted inbound data 2008-10-27 14:49:00 -04:00
qeth_l3_main.c qeth: remove non-recover-thread checkings 2008-10-27 14:48:26 -04:00
qeth_l3_sys.c qeth: remove unnecessary support ckeck in sysfs route6 2008-10-27 14:48:53 -04:00
qeth_l3.h
smsgiucv.c [S390] Cleanup smsgiucv printk messages. 2008-07-14 10:02:21 +02:00
smsgiucv.h