]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
IB/mad: Clean up rcv_has_same_class
authorIra Weiny <ira.weiny@intel.com>
Fri, 8 May 2015 18:27:23 +0000 (14:27 -0400)
committerDoug Ledford <dledford@redhat.com>
Wed, 20 May 2015 16:34:45 +0000 (12:34 -0400)
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>
drivers/infiniband/core/mad.c

index b902d8da9d160e80ce6bacb10ce847dde4d42282..0ae48d45395b4331973a83b12335d69b8cac975d 100644 (file)
@@ -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;
 }