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

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

IB/core cleanup: Add const to args - agent_send_response



In order to support constant callers of agent_send_response we add const
specifiers to the its pointer arguments.

Adjust the call tree 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 a97e2d86
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -457,8 +457,8 @@ static void resolve_cb(int status, struct sockaddr *src_addr,
	complete(&((struct resolve_cb_context *)context)->comp);
}

int rdma_addr_find_dmac_by_grh(union ib_gid *sgid, union ib_gid *dgid, u8 *dmac,
			       u16 *vlan_id)
int rdma_addr_find_dmac_by_grh(const union ib_gid *sgid, const union ib_gid *dgid,
			       u8 *dmac, u16 *vlan_id)
{
	int ret = 0;
	struct rdma_dev_addr dev_addr;
+4 −4
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ static DEFINE_SPINLOCK(ib_agent_port_list_lock);
static LIST_HEAD(ib_agent_port_list);

static struct ib_agent_port_private *
__ib_get_agent_port(struct ib_device *device, int port_num)
__ib_get_agent_port(const struct ib_device *device, int port_num)
{
	struct ib_agent_port_private *entry;

@@ -67,7 +67,7 @@ __ib_get_agent_port(struct ib_device *device, int port_num)
}

static struct ib_agent_port_private *
ib_get_agent_port(struct ib_device *device, int port_num)
ib_get_agent_port(const struct ib_device *device, int port_num)
{
	struct ib_agent_port_private *entry;
	unsigned long flags;
@@ -78,8 +78,8 @@ ib_get_agent_port(struct ib_device *device, int port_num)
	return entry;
}

void agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
			 struct ib_wc *wc, struct ib_device *device,
void agent_send_response(const struct ib_mad *mad, const struct ib_grh *grh,
			 const struct ib_wc *wc, const struct ib_device *device,
			 int port_num, int qpn)
{
	struct ib_agent_port_private *port_priv;
+2 −2
Original line number Diff line number Diff line
@@ -44,8 +44,8 @@ extern int ib_agent_port_open(struct ib_device *device, int port_num);

extern int ib_agent_port_close(struct ib_device *device, int port_num);

extern void agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
				struct ib_wc *wc, struct ib_device *device,
extern void agent_send_response(const struct ib_mad *mad, const struct ib_grh *grh,
				const struct ib_wc *wc, const struct ib_device *device,
				int port_num, int qpn);

#endif	/* __AGENT_H_ */
+4 −4
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ int ib_get_cached_gid(struct ib_device *device,
EXPORT_SYMBOL(ib_get_cached_gid);

int ib_find_cached_gid(struct ib_device   *device,
		       union ib_gid	*gid,
		       const union ib_gid *gid,
		       u8                 *port_num,
		       u16                *index)
{
+5 −4
Original line number Diff line number Diff line
@@ -257,8 +257,9 @@ struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr)
}
EXPORT_SYMBOL(ib_create_ah);

int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc,
		       struct ib_grh *grh, struct ib_ah_attr *ah_attr)
int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
		       const struct ib_wc *wc, const struct ib_grh *grh,
		       struct ib_ah_attr *ah_attr)
{
	u32 flow_class;
	u16 gid_index;
@@ -307,8 +308,8 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc,
}
EXPORT_SYMBOL(ib_init_ah_from_wc);

struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, struct ib_wc *wc,
				   struct ib_grh *grh, u8 port_num)
struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, const struct ib_wc *wc,
				   const struct ib_grh *grh, u8 port_num)
{
	struct ib_ah_attr ah_attr;
	int ret;
Loading