diff mbox

[3/3] IB/mad: Change cast in rcv_has_same_class

Message ID 1430458928-28465-4-git-send-email-ira.weiny@intel.com (mailing list archive)
State Rejected
Headers show

Commit Message

Ira Weiny May 1, 2015, 5:42 a.m. UTC
From: Ira Weiny <ira.weiny@intel.com>

rcv_has_same_class only needs access to the MAD header

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
 drivers/infiniband/core/mad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 2f5a4ab..0749d7b 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -1750,7 +1750,7 @@  static int is_rmpp_data_mad(struct ib_mad_agent_private *mad_agent_priv,
 static inline int rcv_has_same_class(struct ib_mad_send_wr_private *wr,
 				     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;
 }