OSDN Git Service

IB/rxe: Avoid NULL check when search is successful
authorParav Pandit <parav@mellanox.com>
Mon, 27 Aug 2018 05:44:16 +0000 (08:44 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 30 Aug 2018 20:31:50 +0000 (16:31 -0400)
commit536a631d1ec1de6ed51453954407068c10473eea
tree8b760910b1fef572ecd431229ce5c8ebb8c3b970
parent3ccf19e25adf2d3b9c5f1e65b950b6d223e1c4c0
IB/rxe: Avoid NULL check when search is successful

While performing lookup in a pool, if entry is found, take the
reference right there, instead of checking again outside the loop and
save one branch.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_pool.c