IB/ehca: Drop unnecessary NULL test
authorJulia Lawall <julia@diku.dk>
Tue, 3 Aug 2010 21:35:36 +0000 (21:35 +0000)
committerRoland Dreier <rolandd@cisco.com>
Thu, 5 Aug 2010 21:24:55 +0000 (14:24 -0700)
commit2db00321815e20f4a7ff9df43f7cf2073085683d
tree533cb0e6729e0eae893111c30902c00b806df3f7
parentbd5d0ccbef9f2565e76dba4ff291da6a2cb8b1b4
IB/ehca: Drop unnecessary NULL test

list_for_each_entry binds its first argument to a non-null value, and thus
any null test on the value of that argument is superfluous.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
iterator I;
expression x;
statement S,S1,S2;
@@

I(x,...) { <...
- if (x == NULL && ...) S
  ...> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_mrmw.c