* [PATCH 9/9] drivers/infiniband/hw/ehca: Drop unnecessary null test
@ 2010-08-03 21:35 Julia Lawall
[not found] ` <Pine.LNX.4.64.1008032335190.20393-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2010-08-03 21:35 UTC (permalink / raw)
To: Hoang-Nam Nguyen, Christoph Raisch, Roland Dreier, Sean Hefty,
Hal Rosenstock
From: Julia Lawall <julia-dAYI7NvHqcQ@public.gmane.org>
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-dAYI7NvHqcQ@public.gmane.org>
---
drivers/infiniband/hw/ehca/ehca_mrmw.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index 31a68b9..53f4cd4 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)
/* check all FMR belong to same SHCA, and check internal flag */
list_for_each_entry(ib_fmr, fmr_list, list) {
prev_shca = shca;
- if (!ib_fmr) {
- ehca_gen_err("bad fmr=%p in list", ib_fmr);
- ret = -EINVAL;
- goto unmap_fmr_exit0;
- }
shca = container_of(ib_fmr->device, struct ehca_shca,
ib_device);
e_fmr = container_of(ib_fmr, struct ehca_mr, ib.ib_fmr);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <Pine.LNX.4.64.1008032335190.20393-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org>]
* Re: [PATCH 9/9] drivers/infiniband/hw/ehca: Drop unnecessary null test [not found] ` <Pine.LNX.4.64.1008032335190.20393-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org> @ 2010-08-04 18:50 ` Roland Dreier 2010-08-05 13:38 ` Alexander Schmidt 2010-08-05 21:25 ` Roland Dreier 1 sibling, 1 reply; 4+ messages in thread From: Roland Dreier @ 2010-08-04 18:50 UTC (permalink / raw) To: Julia Lawall Cc: Hoang-Nam Nguyen, Christoph Raisch, Roland Dreier, Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-janitors-u79uwXL29TY76Z2rM5mHXA Looks fine to me. ehca guys, any objection? -- Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 9/9] drivers/infiniband/hw/ehca: Drop unnecessary null test 2010-08-04 18:50 ` Roland Dreier @ 2010-08-05 13:38 ` Alexander Schmidt 0 siblings, 0 replies; 4+ messages in thread From: Alexander Schmidt @ 2010-08-05 13:38 UTC (permalink / raw) To: Roland Dreier Cc: Julia Lawall, Hoang-Nam Nguyen, Christoph Raisch, Roland Dreier, Sean Hefty, Hal Rosenstock, linux-rdma, linux-kernel, kernel-janitors On Wed, 04 Aug 2010 11:50:05 -0700 Roland Dreier <rdreier@cisco.com> wrote: > Looks fine to me. ehca guys, any objection? We don't have any objections. Acked-by: Alexander Schmidt <alexs@linux.vnet.ibm.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 9/9] drivers/infiniband/hw/ehca: Drop unnecessary null test [not found] ` <Pine.LNX.4.64.1008032335190.20393-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org> 2010-08-04 18:50 ` Roland Dreier @ 2010-08-05 21:25 ` Roland Dreier 1 sibling, 0 replies; 4+ messages in thread From: Roland Dreier @ 2010-08-05 21:25 UTC (permalink / raw) To: Julia Lawall Cc: Hoang-Nam Nguyen, Christoph Raisch, Roland Dreier, Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-janitors-u79uwXL29TY76Z2rM5mHXA thanks, applied -- Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-05 21:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 21:35 [PATCH 9/9] drivers/infiniband/hw/ehca: Drop unnecessary null test Julia Lawall
[not found] ` <Pine.LNX.4.64.1008032335190.20393-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org>
2010-08-04 18:50 ` Roland Dreier
2010-08-05 13:38 ` Alexander Schmidt
2010-08-05 21:25 ` Roland Dreier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox