Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a97e2d86 authored by Ira Weiny's avatar Ira Weiny Committed by Doug Ledford
Browse files

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: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarHal Rosenstock <hal@mellanox.com>
Reviewed-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 5ede9289
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -582,9 +582,9 @@ static int c2_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
static int c2_process_mad(struct ib_device *ibdev,
			  int mad_flags,
			  u8 port_num,
			  struct ib_wc *in_wc,
			  struct ib_grh *in_grh,
			  struct ib_mad *in_mad, struct ib_mad *out_mad)
			  const struct ib_wc *in_wc,
			  const struct ib_grh *in_grh,
			  const struct ib_mad *in_mad, struct ib_mad *out_mad)
{
	pr_debug("%s:%u\n", __func__, __LINE__);
	return -ENOSYS;
+3 −3
Original line number Diff line number Diff line
@@ -85,9 +85,9 @@ static int iwch_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
static int iwch_process_mad(struct ib_device *ibdev,
			    int mad_flags,
			    u8 port_num,
			    struct ib_wc *in_wc,
			    struct ib_grh *in_grh,
			    struct ib_mad *in_mad, struct ib_mad *out_mad)
			    const struct ib_wc *in_wc,
			    const struct ib_grh *in_grh,
			    const struct ib_mad *in_mad, struct ib_mad *out_mad)
{
	return -ENOSYS;
}
+3 −2
Original line number Diff line number Diff line
@@ -80,8 +80,9 @@ static int c4iw_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
}

static int c4iw_process_mad(struct ib_device *ibdev, int mad_flags,
			    u8 port_num, struct ib_wc *in_wc,
			    struct ib_grh *in_grh, struct ib_mad *in_mad,
			    u8 port_num, const struct ib_wc *in_wc,
			    const struct ib_grh *in_grh,
			    const struct ib_mad *in_mad,
			    struct ib_mad *out_mad)
{
	return -ENOSYS;
+2 −2
Original line number Diff line number Diff line
@@ -191,8 +191,8 @@ int ehca_dealloc_ucontext(struct ib_ucontext *context);
int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);

int ehca_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
		     struct ib_wc *in_wc, struct ib_grh *in_grh,
		     struct ib_mad *in_mad,
		     const struct ib_wc *in_wc, const struct ib_grh *in_grh,
		     const struct ib_mad *in_mad,
		     struct ib_mad *out_mad);

void ehca_poll_eqs(unsigned long data);
+7 −7
Original line number Diff line number Diff line
@@ -140,10 +140,10 @@ struct vertcfl {
} __attribute__ ((packed));

static int ehca_process_perf(struct ib_device *ibdev, u8 port_num,
			     struct ib_wc *in_wc, struct ib_grh *in_grh,
			     struct ib_mad *in_mad, struct ib_mad *out_mad)
			     const struct ib_wc *in_wc, const struct ib_grh *in_grh,
			     const struct ib_mad *in_mad, struct ib_mad *out_mad)
{
	struct ib_perf *in_perf = (struct ib_perf *)in_mad;
	const struct ib_perf *in_perf = (const struct ib_perf *)in_mad;
	struct ib_perf *out_perf = (struct ib_perf *)out_mad;
	struct ib_class_port_info *poi =
		(struct ib_class_port_info *)out_perf->data;
@@ -187,8 +187,8 @@ static int ehca_process_perf(struct ib_device *ibdev, u8 port_num,

		/* if request was globally routed, copy route info */
		if (in_grh) {
			struct vertcfl *vertcfl =
				(struct vertcfl *)&in_grh->version_tclass_flow;
			const struct vertcfl *vertcfl =
				(const struct vertcfl *)&in_grh->version_tclass_flow;
			memcpy(poi->redirect_gid, in_grh->dgid.raw,
			       sizeof(poi->redirect_gid));
			tcslfl->tc        = vertcfl->tc;
@@ -217,8 +217,8 @@ static int ehca_process_perf(struct ib_device *ibdev, u8 port_num,
}

int ehca_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
		     struct ib_wc *in_wc, struct ib_grh *in_grh,
		     struct ib_mad *in_mad, struct ib_mad *out_mad)
		     const struct ib_wc *in_wc, const struct ib_grh *in_grh,
		     const struct ib_mad *in_mad, struct ib_mad *out_mad)
{
	int ret;

Loading