RDMA/rxe: Remove useless code in rxe_recv.c
Subsystems (2)
PATCH 1/1 RDMA/rxe: Remove useless code in rxe_recv.c
In check_keys() in rxe_recv.c
if ((...) && pkt->mask) {
...
}always has pkt->mask non zero since in rxe_udp_encap_recv() pkt->mask is always set to RXE_GRH_MASK (!= 0). There is no obvious reason for this additional test and the original intent is lost. This patch simplifies the expression.
Fixes 8b7b59d030cc0 ("IB/rxe: remove redudant qpn check")
Signed-off-by Bob Pearson <[email protected]>
--- drivers/infiniband/sw/rxe/rxe_recv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/sw/rxe/rxe_recv.c +1 -2
@@ -85,8 +85,7 @@ static int check_keys(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, goto err1; } -if ((qp_type (qp) ==IB_QPT_UD ||qp_type (qp) ==IB_QPT_GSI ) && - pkt->mask) { +if (qp_type (qp) ==IB_QPT_UD ||qp_type (qp) ==IB_QPT_GSI ) {u32 qkey = (qpn ==1 ) ?GSI_QKEY : qp->attr.qkey;if (unlikely (deth_qkey (pkt) != qkey)) {
Signature · 1 line
2.27.0
Quoted 11 lines · Bob Pearson
In
check_keys()inrxe_recv.cif ((...) && pkt->mask) { ... }always has
pkt->masknon zero since inrxe_udp_encap_recv()pkt->maskis always set toRXE_GRH_MASK(!= 0). There is no obvious reason for this additional test and the original intent is lost. This patch simplifies the expression.
Quoted 5 lines
Fixes 8b7b59d030cc0 ("IB/rxe: remove redudant qpn check")Signed-off-by Bob Pearson <[email protected]>--- drivers/infiniband/sw/rxe/rxe_recv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to for-next, thanks
Jason