aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2015-05-31 17:15:30 -0400
committerDoug Ledford <dledford@redhat.com>2015-06-02 09:33:13 -0400
commita97e2d86a9b88ea9e9a280b594b80f0eec2c955b (patch)
treee50d0d039e177a4403a0b6b7d5d32930dce2e777 /drivers/infiniband/hw/mthca
parent5ede9289859d94746d1ce55ad5ba038b42b9406c (diff)
IB/core cleanup: Add const on args - device->process_mad
The process_mad device function declares some parameters as "in". Make those parameters const and adjust the call tree under process_mad in the various drivers accordingly. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Hal Rosenstock <hal@mellanox.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cmd.c4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cmd.h4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_dev.h6
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mad.c10
4 files changed, 12 insertions, 12 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
index 9d3e5c1ac60e..c7f49bbb0c72 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -1858,8 +1858,8 @@ int mthca_CONF_SPECIAL_QP(struct mthca_dev *dev, int type, u32 qpn)
1858} 1858}
1859 1859
1860int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey, 1860int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey,
1861 int port, struct ib_wc *in_wc, struct ib_grh *in_grh, 1861 int port, const struct ib_wc *in_wc, const struct ib_grh *in_grh,
1862 void *in_mad, void *response_mad) 1862 const void *in_mad, void *response_mad)
1863{ 1863{
1864 struct mthca_mailbox *inmailbox, *outmailbox; 1864 struct mthca_mailbox *inmailbox, *outmailbox;
1865 void *inbox; 1865 void *inbox;
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.h b/drivers/infiniband/hw/mthca/mthca_cmd.h
index f952244c54de..d2e5b194b938 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.h
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.h
@@ -312,8 +312,8 @@ int mthca_QUERY_QP(struct mthca_dev *dev, u32 num, int is_ee,
312 struct mthca_mailbox *mailbox); 312 struct mthca_mailbox *mailbox);
313int mthca_CONF_SPECIAL_QP(struct mthca_dev *dev, int type, u32 qpn); 313int mthca_CONF_SPECIAL_QP(struct mthca_dev *dev, int type, u32 qpn);
314int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey, 314int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey,
315 int port, struct ib_wc *in_wc, struct ib_grh *in_grh, 315 int port, const struct ib_wc *in_wc, const struct ib_grh *in_grh,
316 void *in_mad, void *response_mad); 316 const void *in_mad, void *response_mad);
317int mthca_READ_MGM(struct mthca_dev *dev, int index, 317int mthca_READ_MGM(struct mthca_dev *dev, int index,
318 struct mthca_mailbox *mailbox); 318 struct mthca_mailbox *mailbox);
319int mthca_WRITE_MGM(struct mthca_dev *dev, int index, 319int mthca_WRITE_MGM(struct mthca_dev *dev, int index,
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h
index 7e6a6d64ad4e..b70f9ff23171 100644
--- a/drivers/infiniband/hw/mthca/mthca_dev.h
+++ b/drivers/infiniband/hw/mthca/mthca_dev.h
@@ -576,9 +576,9 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid);
576int mthca_process_mad(struct ib_device *ibdev, 576int mthca_process_mad(struct ib_device *ibdev,
577 int mad_flags, 577 int mad_flags,
578 u8 port_num, 578 u8 port_num,
579 struct ib_wc *in_wc, 579 const struct ib_wc *in_wc,
580 struct ib_grh *in_grh, 580 const struct ib_grh *in_grh,
581 struct ib_mad *in_mad, 581 const struct ib_mad *in_mad,
582 struct ib_mad *out_mad); 582 struct ib_mad *out_mad);
583int mthca_create_agents(struct mthca_dev *dev); 583int mthca_create_agents(struct mthca_dev *dev);
584void mthca_free_agents(struct mthca_dev *dev); 584void mthca_free_agents(struct mthca_dev *dev);
diff --git a/drivers/infiniband/hw/mthca/mthca_mad.c b/drivers/infiniband/hw/mthca/mthca_mad.c
index 8881fa376e06..d54608ca0820 100644
--- a/drivers/infiniband/hw/mthca/mthca_mad.c
+++ b/drivers/infiniband/hw/mthca/mthca_mad.c
@@ -104,7 +104,7 @@ static void update_sm_ah(struct mthca_dev *dev,
104 */ 104 */
105static void smp_snoop(struct ib_device *ibdev, 105static void smp_snoop(struct ib_device *ibdev,
106 u8 port_num, 106 u8 port_num,
107 struct ib_mad *mad, 107 const struct ib_mad *mad,
108 u16 prev_lid) 108 u16 prev_lid)
109{ 109{
110 struct ib_event event; 110 struct ib_event event;
@@ -160,7 +160,7 @@ static void node_desc_override(struct ib_device *dev,
160 160
161static void forward_trap(struct mthca_dev *dev, 161static void forward_trap(struct mthca_dev *dev,
162 u8 port_num, 162 u8 port_num,
163 struct ib_mad *mad) 163 const struct ib_mad *mad)
164{ 164{
165 int qpn = mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_LID_ROUTED; 165 int qpn = mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_LID_ROUTED;
166 struct ib_mad_send_buf *send_buf; 166 struct ib_mad_send_buf *send_buf;
@@ -195,9 +195,9 @@ static void forward_trap(struct mthca_dev *dev,
195int mthca_process_mad(struct ib_device *ibdev, 195int mthca_process_mad(struct ib_device *ibdev,
196 int mad_flags, 196 int mad_flags,
197 u8 port_num, 197 u8 port_num,
198 struct ib_wc *in_wc, 198 const struct ib_wc *in_wc,
199 struct ib_grh *in_grh, 199 const struct ib_grh *in_grh,
200 struct ib_mad *in_mad, 200 const struct ib_mad *in_mad,
201 struct ib_mad *out_mad) 201 struct ib_mad *out_mad)
202{ 202{
203 int err; 203 int err;