Commit 24fd836a authored by Chengchang Tang's avatar Chengchang Tang Committed by Juan Zhou
Browse files

RDMA/hns: Remove unused parameters detected by -Wextra

driver inclusion
category: cleanup
bugzilla: https://gitee.com/openeuler/kernel/issues/I8LY0D



--------------------------------------------------------------------------

-Wextra will check the unused parameters. This patch removes these
unused parameters.

Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
parent c4c433b6
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ struct hns_roce_buf *hns_roce_buf_alloc(struct hns_roce_dev *hr_dev, u32 size,
	return buf;
}

int hns_roce_get_kmem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs,
int hns_roce_get_kmem_bufs(dma_addr_t *bufs,
			   int buf_cnt, struct hns_roce_buf *buf,
			   unsigned int page_shift)
{
@@ -147,8 +147,7 @@ int hns_roce_get_kmem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs,
	return total;
}

int hns_roce_get_umem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs,
			   int buf_cnt, struct ib_umem *umem,
int hns_roce_get_umem_bufs(dma_addr_t *bufs, int buf_cnt, struct ib_umem *umem,
			   unsigned int page_shift)
{
	struct ib_block_iter biter;
+5 −8
Original line number Diff line number Diff line
@@ -149,8 +149,7 @@ static void *alloc_dca_pages(struct hns_roce_dev *hr_dev, bool is_user,

}

static void init_dca_kmem_states(struct hns_roce_dev *hr_dev,
				 struct hns_dca_page_state *states, int count,
static void init_dca_kmem_states(struct hns_dca_page_state *states, int count,
				 struct hns_roce_buf *kmem)
{
	dma_addr_t cur_addr;
@@ -167,8 +166,7 @@ static void init_dca_kmem_states(struct hns_roce_dev *hr_dev,
	}
}

static void init_dca_umem_states(struct hns_roce_dev *hr_dev,
				 struct hns_dca_page_state *states, int count,
static void init_dca_umem_states(struct hns_dca_page_state *states, int count,
				 struct ib_umem *umem)
{
	struct ib_block_iter biter;
@@ -201,9 +199,9 @@ static struct hns_dca_page_state *alloc_dca_states(struct hns_roce_dev *hr_dev,
		return NULL;

	if (is_user)
		init_dca_umem_states(hr_dev, states, count, pages);
		init_dca_umem_states(states, count, pages);
	else
		init_dca_kmem_states(hr_dev, states, count, pages);
		init_dca_kmem_states(states, count, pages);

	return states;
}
@@ -1482,8 +1480,7 @@ static void teardown_kdca(struct hns_roce_dca_cfg *cfg)
	cfg->buf_list = NULL;
}

int hns_roce_enable_dca(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
			struct ib_udata *udata)
int hns_roce_enable_dca(struct hns_roce_qp *hr_qp, struct ib_udata *udata)
{
	struct hns_roce_dca_cfg *cfg = &hr_qp->dca_cfg;

+1 −2
Original line number Diff line number Diff line
@@ -61,8 +61,7 @@ void hns_roce_register_udca(struct hns_roce_dev *hr_dev, int max_qps,
void hns_roce_unregister_udca(struct hns_roce_dev *hr_dev,
			      struct hns_roce_ucontext *uctx);

int hns_roce_enable_dca(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
			struct ib_udata *udata);
int hns_roce_enable_dca(struct hns_roce_qp *hr_qp, struct ib_udata *udata);
void hns_roce_disable_dca(struct hns_roce_dev *hr_dev,
			  struct hns_roce_qp *hr_qp, struct ib_udata *udata);

+1 −2
Original line number Diff line number Diff line
@@ -607,8 +607,7 @@ void hns_roce_register_uctx_debugfs(struct hns_roce_dev *hr_dev,
				     hr_dev, uctx);
}

void hns_roce_unregister_uctx_debugfs(struct hns_roce_dev *hr_dev,
				      struct hns_roce_ucontext *uctx)
void hns_roce_unregister_uctx_debugfs(struct hns_roce_ucontext *uctx)
{
	debugfs_remove_recursive(uctx->dca_dbgfs.root);
}
+1 −2
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ void hns_roce_register_debugfs(struct hns_roce_dev *hr_dev);
void hns_roce_unregister_debugfs(struct hns_roce_dev *hr_dev);
void hns_roce_register_uctx_debugfs(struct hns_roce_dev *hr_dev,
				    struct hns_roce_ucontext *uctx);
void hns_roce_unregister_uctx_debugfs(struct hns_roce_dev *hr_dev,
				      struct hns_roce_ucontext *uctx);
void hns_roce_unregister_uctx_debugfs(struct hns_roce_ucontext *uctx);

#endif
Loading