diff options
author | Ira Weiny <ira.weiny@intel.com> | 2015-05-08 14:27:23 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-05-20 12:34:45 -0400 |
commit | 8bf4b30c24df184528261e252227debf611b4c11 (patch) | |
tree | 1b9c9dbf07e5c8106c696a0887430c0f5bc86d7e /drivers/infiniband/core | |
parent | 96909308542006215980874ce496101ea51aa031 (diff) | |
download | op-kernel-dev-8bf4b30c24df184528261e252227debf611b4c11.zip op-kernel-dev-8bf4b30c24df184528261e252227debf611b4c11.tar.gz |
IB/mad: Clean up rcv_has_same_class
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>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/mad.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index b902d8d..0ae48d4 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -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; } |