Skip to content

Commit

Permalink
IB/mad: Clean up rcv_has_same_class
Browse files Browse the repository at this point in the history
rcv_has_same_class only needs access to the MAD header
specify WR and Receive WC as const

Reviewed-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Ira Weiny authored and Doug Ledford committed May 20, 2015
1 parent 9690930 commit 8bf4b30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1747,10 +1747,10 @@ static int is_rmpp_data_mad(struct ib_mad_agent_private *mad_agent_priv,
(rmpp_mad->rmpp_hdr.rmpp_type == IB_MGMT_RMPP_TYPE_DATA);
}

static inline int rcv_has_same_class(struct ib_mad_send_wr_private *wr,
struct ib_mad_recv_wc *rwc)
static inline int rcv_has_same_class(const struct ib_mad_send_wr_private *wr,
const struct ib_mad_recv_wc *rwc)
{
return ((struct ib_mad *)(wr->send_buf.mad))->mad_hdr.mgmt_class ==
return ((struct ib_mad_hdr *)(wr->send_buf.mad))->mgmt_class ==
rwc->recv_buf.mad->mad_hdr.mgmt_class;
}

Expand Down

0 comments on commit 8bf4b30

Please sign in to comment.