* [PATCH] RDMA/irdma: Remove unused irdma_cqp_*_fpm_val_cmd functions
@ 2024-12-23 0:16 linux
2024-12-23 0:21 ` Dr. David Alan Gilbert
2024-12-24 9:58 ` Leon Romanovsky
0 siblings, 2 replies; 3+ messages in thread
From: linux @ 2024-12-23 0:16 UTC (permalink / raw)
To: mustafa.ismail, tatyana.e.nikolova, jgg, leon, linux-rdma
Cc: linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
irdma_cqp_commit_fpm_val_cmd() and irdma_cqp_query_fpm_val_cmd()
were added in 2021 by
commit 915cc7ac0f8e ("RDMA/irdma: Add miscellaneous utility definitions")
but haven't been used.
Remove them.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/infiniband/hw/irdma/osdep.h | 4 --
drivers/infiniband/hw/irdma/protos.h | 4 --
drivers/infiniband/hw/irdma/utils.c | 68 ----------------------------
3 files changed, 76 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/osdep.h b/drivers/infiniband/hw/irdma/osdep.h
index e1e3d3ae72b7..ddf02a462efa 100644
--- a/drivers/infiniband/hw/irdma/osdep.h
+++ b/drivers/infiniband/hw/irdma/osdep.h
@@ -59,10 +59,6 @@ int irdma_cqp_sds_cmd(struct irdma_sc_dev *dev,
int irdma_cqp_manage_hmc_fcn_cmd(struct irdma_sc_dev *dev,
struct irdma_hmc_fcn_info *hmcfcninfo,
u16 *pmf_idx);
-int irdma_cqp_query_fpm_val_cmd(struct irdma_sc_dev *dev,
- struct irdma_dma_mem *val_mem, u8 hmc_fn_id);
-int irdma_cqp_commit_fpm_val_cmd(struct irdma_sc_dev *dev,
- struct irdma_dma_mem *val_mem, u8 hmc_fn_id);
int irdma_alloc_query_fpm_buf(struct irdma_sc_dev *dev,
struct irdma_dma_mem *mem);
void *irdma_remove_cqp_head(struct irdma_sc_dev *dev);
diff --git a/drivers/infiniband/hw/irdma/protos.h b/drivers/infiniband/hw/irdma/protos.h
index d7c8ea948bcd..c0c9441885d3 100644
--- a/drivers/infiniband/hw/irdma/protos.h
+++ b/drivers/infiniband/hw/irdma/protos.h
@@ -85,10 +85,6 @@ int irdma_process_cqp_cmd(struct irdma_sc_dev *dev,
int irdma_process_bh(struct irdma_sc_dev *dev);
int irdma_cqp_sds_cmd(struct irdma_sc_dev *dev,
struct irdma_update_sds_info *info);
-int irdma_cqp_query_fpm_val_cmd(struct irdma_sc_dev *dev,
- struct irdma_dma_mem *val_mem, u8 hmc_fn_id);
-int irdma_cqp_commit_fpm_val_cmd(struct irdma_sc_dev *dev,
- struct irdma_dma_mem *val_mem, u8 hmc_fn_id);
int irdma_alloc_query_fpm_buf(struct irdma_sc_dev *dev,
struct irdma_dma_mem *mem);
int irdma_cqp_manage_hmc_fcn_cmd(struct irdma_sc_dev *dev,
diff --git a/drivers/infiniband/hw/irdma/utils.c b/drivers/infiniband/hw/irdma/utils.c
index 0422787592d8..1ea29994ace3 100644
--- a/drivers/infiniband/hw/irdma/utils.c
+++ b/drivers/infiniband/hw/irdma/utils.c
@@ -971,74 +971,6 @@ void irdma_terminate_del_timer(struct irdma_sc_qp *qp)
irdma_qp_rem_ref(&iwqp->ibqp);
}
-/**
- * irdma_cqp_query_fpm_val_cmd - send cqp command for fpm
- * @dev: function device struct
- * @val_mem: buffer for fpm
- * @hmc_fn_id: function id for fpm
- */
-int irdma_cqp_query_fpm_val_cmd(struct irdma_sc_dev *dev,
- struct irdma_dma_mem *val_mem, u8 hmc_fn_id)
-{
- struct irdma_cqp_request *cqp_request;
- struct cqp_cmds_info *cqp_info;
- struct irdma_pci_f *rf = dev_to_rf(dev);
- int status;
-
- cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, true);
- if (!cqp_request)
- return -ENOMEM;
-
- cqp_info = &cqp_request->info;
- cqp_request->param = NULL;
- cqp_info->in.u.query_fpm_val.cqp = dev->cqp;
- cqp_info->in.u.query_fpm_val.fpm_val_pa = val_mem->pa;
- cqp_info->in.u.query_fpm_val.fpm_val_va = val_mem->va;
- cqp_info->in.u.query_fpm_val.hmc_fn_id = hmc_fn_id;
- cqp_info->cqp_cmd = IRDMA_OP_QUERY_FPM_VAL;
- cqp_info->post_sq = 1;
- cqp_info->in.u.query_fpm_val.scratch = (uintptr_t)cqp_request;
-
- status = irdma_handle_cqp_op(rf, cqp_request);
- irdma_put_cqp_request(&rf->cqp, cqp_request);
-
- return status;
-}
-
-/**
- * irdma_cqp_commit_fpm_val_cmd - commit fpm values in hw
- * @dev: hardware control device structure
- * @val_mem: buffer with fpm values
- * @hmc_fn_id: function id for fpm
- */
-int irdma_cqp_commit_fpm_val_cmd(struct irdma_sc_dev *dev,
- struct irdma_dma_mem *val_mem, u8 hmc_fn_id)
-{
- struct irdma_cqp_request *cqp_request;
- struct cqp_cmds_info *cqp_info;
- struct irdma_pci_f *rf = dev_to_rf(dev);
- int status;
-
- cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, true);
- if (!cqp_request)
- return -ENOMEM;
-
- cqp_info = &cqp_request->info;
- cqp_request->param = NULL;
- cqp_info->in.u.commit_fpm_val.cqp = dev->cqp;
- cqp_info->in.u.commit_fpm_val.fpm_val_pa = val_mem->pa;
- cqp_info->in.u.commit_fpm_val.fpm_val_va = val_mem->va;
- cqp_info->in.u.commit_fpm_val.hmc_fn_id = hmc_fn_id;
- cqp_info->cqp_cmd = IRDMA_OP_COMMIT_FPM_VAL;
- cqp_info->post_sq = 1;
- cqp_info->in.u.commit_fpm_val.scratch = (uintptr_t)cqp_request;
-
- status = irdma_handle_cqp_op(rf, cqp_request);
- irdma_put_cqp_request(&rf->cqp, cqp_request);
-
- return status;
-}
-
/**
* irdma_cqp_cq_create_cmd - create a cq for the cqp
* @dev: device pointer
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/irdma: Remove unused irdma_cqp_*_fpm_val_cmd functions
2024-12-23 0:16 [PATCH] RDMA/irdma: Remove unused irdma_cqp_*_fpm_val_cmd functions linux
@ 2024-12-23 0:21 ` Dr. David Alan Gilbert
2024-12-24 9:58 ` Leon Romanovsky
1 sibling, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2024-12-23 0:21 UTC (permalink / raw)
To: tatyana.e.nikolova, jgg, leon, linux-rdma; +Cc: linux-kernel
Note Mustafa's email address bounces:
mustafa.ismail@intel.com
host mgamail.eglb.intel.com [192.198.163.19]
SMTP error from remote mail server after RCPT TO:<mustafa.ismail@intel.com>:
550 #5.1.0 Address rejected.
Dave
* linux@treblig.org (linux@treblig.org) wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> irdma_cqp_commit_fpm_val_cmd() and irdma_cqp_query_fpm_val_cmd()
> were added in 2021 by
> commit 915cc7ac0f8e ("RDMA/irdma: Add miscellaneous utility definitions")
> but haven't been used.
>
> Remove them.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> ---
> drivers/infiniband/hw/irdma/osdep.h | 4 --
> drivers/infiniband/hw/irdma/protos.h | 4 --
> drivers/infiniband/hw/irdma/utils.c | 68 ----------------------------
> 3 files changed, 76 deletions(-)
>
> diff --git a/drivers/infiniband/hw/irdma/osdep.h b/drivers/infiniband/hw/irdma/osdep.h
> index e1e3d3ae72b7..ddf02a462efa 100644
> --- a/drivers/infiniband/hw/irdma/osdep.h
> +++ b/drivers/infiniband/hw/irdma/osdep.h
> @@ -59,10 +59,6 @@ int irdma_cqp_sds_cmd(struct irdma_sc_dev *dev,
> int irdma_cqp_manage_hmc_fcn_cmd(struct irdma_sc_dev *dev,
> struct irdma_hmc_fcn_info *hmcfcninfo,
> u16 *pmf_idx);
> -int irdma_cqp_query_fpm_val_cmd(struct irdma_sc_dev *dev,
> - struct irdma_dma_mem *val_mem, u8 hmc_fn_id);
> -int irdma_cqp_commit_fpm_val_cmd(struct irdma_sc_dev *dev,
> - struct irdma_dma_mem *val_mem, u8 hmc_fn_id);
> int irdma_alloc_query_fpm_buf(struct irdma_sc_dev *dev,
> struct irdma_dma_mem *mem);
> void *irdma_remove_cqp_head(struct irdma_sc_dev *dev);
> diff --git a/drivers/infiniband/hw/irdma/protos.h b/drivers/infiniband/hw/irdma/protos.h
> index d7c8ea948bcd..c0c9441885d3 100644
> --- a/drivers/infiniband/hw/irdma/protos.h
> +++ b/drivers/infiniband/hw/irdma/protos.h
> @@ -85,10 +85,6 @@ int irdma_process_cqp_cmd(struct irdma_sc_dev *dev,
> int irdma_process_bh(struct irdma_sc_dev *dev);
> int irdma_cqp_sds_cmd(struct irdma_sc_dev *dev,
> struct irdma_update_sds_info *info);
> -int irdma_cqp_query_fpm_val_cmd(struct irdma_sc_dev *dev,
> - struct irdma_dma_mem *val_mem, u8 hmc_fn_id);
> -int irdma_cqp_commit_fpm_val_cmd(struct irdma_sc_dev *dev,
> - struct irdma_dma_mem *val_mem, u8 hmc_fn_id);
> int irdma_alloc_query_fpm_buf(struct irdma_sc_dev *dev,
> struct irdma_dma_mem *mem);
> int irdma_cqp_manage_hmc_fcn_cmd(struct irdma_sc_dev *dev,
> diff --git a/drivers/infiniband/hw/irdma/utils.c b/drivers/infiniband/hw/irdma/utils.c
> index 0422787592d8..1ea29994ace3 100644
> --- a/drivers/infiniband/hw/irdma/utils.c
> +++ b/drivers/infiniband/hw/irdma/utils.c
> @@ -971,74 +971,6 @@ void irdma_terminate_del_timer(struct irdma_sc_qp *qp)
> irdma_qp_rem_ref(&iwqp->ibqp);
> }
>
> -/**
> - * irdma_cqp_query_fpm_val_cmd - send cqp command for fpm
> - * @dev: function device struct
> - * @val_mem: buffer for fpm
> - * @hmc_fn_id: function id for fpm
> - */
> -int irdma_cqp_query_fpm_val_cmd(struct irdma_sc_dev *dev,
> - struct irdma_dma_mem *val_mem, u8 hmc_fn_id)
> -{
> - struct irdma_cqp_request *cqp_request;
> - struct cqp_cmds_info *cqp_info;
> - struct irdma_pci_f *rf = dev_to_rf(dev);
> - int status;
> -
> - cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, true);
> - if (!cqp_request)
> - return -ENOMEM;
> -
> - cqp_info = &cqp_request->info;
> - cqp_request->param = NULL;
> - cqp_info->in.u.query_fpm_val.cqp = dev->cqp;
> - cqp_info->in.u.query_fpm_val.fpm_val_pa = val_mem->pa;
> - cqp_info->in.u.query_fpm_val.fpm_val_va = val_mem->va;
> - cqp_info->in.u.query_fpm_val.hmc_fn_id = hmc_fn_id;
> - cqp_info->cqp_cmd = IRDMA_OP_QUERY_FPM_VAL;
> - cqp_info->post_sq = 1;
> - cqp_info->in.u.query_fpm_val.scratch = (uintptr_t)cqp_request;
> -
> - status = irdma_handle_cqp_op(rf, cqp_request);
> - irdma_put_cqp_request(&rf->cqp, cqp_request);
> -
> - return status;
> -}
> -
> -/**
> - * irdma_cqp_commit_fpm_val_cmd - commit fpm values in hw
> - * @dev: hardware control device structure
> - * @val_mem: buffer with fpm values
> - * @hmc_fn_id: function id for fpm
> - */
> -int irdma_cqp_commit_fpm_val_cmd(struct irdma_sc_dev *dev,
> - struct irdma_dma_mem *val_mem, u8 hmc_fn_id)
> -{
> - struct irdma_cqp_request *cqp_request;
> - struct cqp_cmds_info *cqp_info;
> - struct irdma_pci_f *rf = dev_to_rf(dev);
> - int status;
> -
> - cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, true);
> - if (!cqp_request)
> - return -ENOMEM;
> -
> - cqp_info = &cqp_request->info;
> - cqp_request->param = NULL;
> - cqp_info->in.u.commit_fpm_val.cqp = dev->cqp;
> - cqp_info->in.u.commit_fpm_val.fpm_val_pa = val_mem->pa;
> - cqp_info->in.u.commit_fpm_val.fpm_val_va = val_mem->va;
> - cqp_info->in.u.commit_fpm_val.hmc_fn_id = hmc_fn_id;
> - cqp_info->cqp_cmd = IRDMA_OP_COMMIT_FPM_VAL;
> - cqp_info->post_sq = 1;
> - cqp_info->in.u.commit_fpm_val.scratch = (uintptr_t)cqp_request;
> -
> - status = irdma_handle_cqp_op(rf, cqp_request);
> - irdma_put_cqp_request(&rf->cqp, cqp_request);
> -
> - return status;
> -}
> -
> /**
> * irdma_cqp_cq_create_cmd - create a cq for the cqp
> * @dev: device pointer
> --
> 2.47.1
>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/irdma: Remove unused irdma_cqp_*_fpm_val_cmd functions
2024-12-23 0:16 [PATCH] RDMA/irdma: Remove unused irdma_cqp_*_fpm_val_cmd functions linux
2024-12-23 0:21 ` Dr. David Alan Gilbert
@ 2024-12-24 9:58 ` Leon Romanovsky
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2024-12-24 9:58 UTC (permalink / raw)
To: mustafa.ismail, tatyana.e.nikolova, jgg, linux-rdma, linux; +Cc: linux-kernel
On Mon, 23 Dec 2024 00:16:13 +0000, linux@treblig.org wrote:
> irdma_cqp_commit_fpm_val_cmd() and irdma_cqp_query_fpm_val_cmd()
> were added in 2021 by
> commit 915cc7ac0f8e ("RDMA/irdma: Add miscellaneous utility definitions")
> but haven't been used.
>
> Remove them.
>
> [...]
Applied, thanks!
[1/1] RDMA/irdma: Remove unused irdma_cqp_*_fpm_val_cmd functions
https://git.kernel.org/rdma/rdma/c/695df3e833c04a
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-24 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-23 0:16 [PATCH] RDMA/irdma: Remove unused irdma_cqp_*_fpm_val_cmd functions linux
2024-12-23 0:21 ` Dr. David Alan Gilbert
2024-12-24 9:58 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox