android_kernel_xiaomi_sm8350/drivers/infiniband/hw/ehca
Julia Lawall 139cdab0a2 IB/ehca: Remove redundant test of vpage
vpage is checked not to be NULL just after it is initialized at the
beginning of each loop iteration.

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: Roland Dreier <rolandd@cisco.com>
2008-12-21 13:29:13 -08:00
..
ehca_av.c
ehca_classes_pSeries.h
ehca_classes.h IB/ehca: Replace modulus operations in flush error completion path 2008-12-05 11:25:38 -08:00
ehca_cq.c IB/ehca: Fix reported max number of QPs and CQs in systems with >1 adapter 2008-10-22 15:52:31 -07:00
ehca_eq.c IB/ehca: Remove redundant test of vpage 2008-12-21 13:29:13 -08:00
ehca_hca.c IB/ehca: Use default value for Local CA ACK Delay if FW returns 0 2008-07-22 14:18:08 -07:00
ehca_irq.c IB/ehca: Remove reference to special QP in case of port activation failure 2008-11-11 15:44:22 -08:00
ehca_irq.h
ehca_iverbs.h IB/ehca: Generate flush status CQ entries 2008-09-20 20:05:21 -07:00
ehca_main.c IB/ehca: Fix locking for shca_list_lock 2008-12-01 20:58:57 -08:00
ehca_mcast.c
ehca_mrmw.c
ehca_mrmw.h
ehca_pd.c
ehca_qes.h IB/ehca: Discard double CQE for one WR 2008-08-12 11:34:59 -07:00
ehca_qp.c IB/ehca: Replace modulus operations in flush error completion path 2008-12-05 11:25:38 -08:00
ehca_reqs.c IB/ehca: Replace modulus operations in flush error completion path 2008-12-05 11:25:38 -08:00
ehca_sqp.c
ehca_tools.h removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
ehca_uverbs.c
hcp_if.c IB/ehca: In case of lost interrupts, trigger EOI to reenable interrupts 2008-07-14 23:48:47 -07:00
hcp_if.h IB/ehca: In case of lost interrupts, trigger EOI to reenable interrupts 2008-07-14 23:48:47 -07:00
hcp_phyp.c
hcp_phyp.h
hipz_fns_core.h
hipz_fns.h
hipz_hw.h
ipz_pt_fn.c IB/ehca: Release mutex in error path of alloc_small_queue_page() 2008-07-22 14:18:10 -07:00
ipz_pt_fn.h
Kconfig
Makefile