diff options
author | Julia Lawall <julia@diku.dk> | 2010-08-03 17:35:36 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-08-05 17:24:55 -0400 |
commit | 2db00321815e20f4a7ff9df43f7cf2073085683d (patch) | |
tree | 533cb0e6729e0eae893111c30902c00b806df3f7 /drivers/infiniband/hw | |
parent | bd5d0ccbef9f2565e76dba4ff291da6a2cb8b1b4 (diff) |
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>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_mrmw.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index 31a68b9c52d0..53f4cd4fc19a 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c | |||
@@ -933,11 +933,6 @@ int ehca_unmap_fmr(struct list_head *fmr_list) | |||
933 | /* check all FMR belong to same SHCA, and check internal flag */ | 933 | /* check all FMR belong to same SHCA, and check internal flag */ |
934 | list_for_each_entry(ib_fmr, fmr_list, list) { | 934 | list_for_each_entry(ib_fmr, fmr_list, list) { |
935 | prev_shca = shca; | 935 | prev_shca = shca; |
936 | if (!ib_fmr) { | ||
937 | ehca_gen_err("bad fmr=%p in list", ib_fmr); | ||
938 | ret = -EINVAL; | ||
939 | goto unmap_fmr_exit0; | ||
940 | } | ||
941 | shca = container_of(ib_fmr->device, struct ehca_shca, | 936 | shca = container_of(ib_fmr->device, struct ehca_shca, |
942 | ib_device); | 937 | ib_device); |
943 | e_fmr = container_of(ib_fmr, struct ehca_mr, ib.ib_fmr); | 938 | e_fmr = container_of(ib_fmr, struct ehca_mr, ib.ib_fmr); |