linux_dsm_epyc7002/drivers/infiniband/hw
Roland Dreier 30c00986f3 IB/mthca: Simplify CQ cleaning in mthca_free_qp()
mthca_free_qp() already has local variables to hold the QP's send_cq
and recv_cq, so we can slightly clean up the calls to mthca_cq_clean()
by using those local variables instead of expressions like
to_mcq(qp->ibqp.send_cq).

Also, by cleaning the recv_cq first, we can avoid worrying about
whether the QP is attached to an SRQ for the second call, because we
would only clean send_cq if send_cq is not equal to recv_cq, and that
means send_cq cannot have any receive completions from the QP being
destroyed.

All this work even improves the generated code a bit:

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5 (-5)
function                                     old     new   delta
mthca_free_qp                                510     505      -5

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-04-24 16:31:11 -07:00
..
amso1100 [PATCH] Scheduled removal of SA_xxx interrupt flags fixups 2007-02-14 08:09:54 -08:00
cxgb3 RDMA/cxgb3: Add set_tcb_rpl_handler 2007-04-12 10:37:11 -07:00
ehca IB/ehca: Make scaling code work without CPU hotplug 2007-03-22 14:40:16 -07:00
ipath IB/ipath: Fix WC format drift between user and kernel space 2007-04-18 20:21:01 -07:00
mthca IB/mthca: Simplify CQ cleaning in mthca_free_qp() 2007-04-24 16:31:11 -07:00