* RE: [PATCH 1/1] RDMA/irdma: remove the check to the returned value of irdma_uk_cq_init
2021-10-19 15:37 [PATCH 1/1] RDMA/irdma: remove the check to the returned value of irdma_uk_cq_init yanjun.zhu
@ 2021-10-19 15:36 ` Saleem, Shiraz
2021-10-19 23:40 ` Yanjun Zhu
2021-10-20 23:03 ` Jason Gunthorpe
1 sibling, 1 reply; 4+ messages in thread
From: Saleem, Shiraz @ 2021-10-19 15:36 UTC (permalink / raw)
To: yanjun.zhu, Ismail, Mustafa, dledford, jgg, linux-rdma, leon
> Subject: [PATCH 1/1] RDMA/irdma: remove the check to the returned value of
> irdma_uk_cq_init
Maybe you can condense this to --
RDMA/irdma: Make irdma_uk_cq_init return a void
>
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> Since the function irdma_uk_cq_init always returns 0, so remove the check to the
> returned value of the function irdma_uk_cq_init.
Maybe --
irdma_uk_cq_init always returns 0, so make it a void.
>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
> drivers/infiniband/hw/irdma/ctrl.c | 5 +----
> drivers/infiniband/hw/irdma/uk.c | 6 ++----
> drivers/infiniband/hw/irdma/user.h | 4 ++--
> 3 files changed, 5 insertions(+), 10 deletions(-)
>
Thanks for this!
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] RDMA/irdma: remove the check to the returned value of irdma_uk_cq_init
@ 2021-10-19 15:37 yanjun.zhu
2021-10-19 15:36 ` Saleem, Shiraz
2021-10-20 23:03 ` Jason Gunthorpe
0 siblings, 2 replies; 4+ messages in thread
From: yanjun.zhu @ 2021-10-19 15:37 UTC (permalink / raw)
To: mustafa.ismail, shiraz.saleem, dledford, jgg, linux-rdma,
yanjun.zhu, leon
From: Zhu Yanjun <yanjun.zhu@linux.dev>
Since the function irdma_uk_cq_init always returns 0, so remove the check
to the returned value of the function irdma_uk_cq_init.
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
drivers/infiniband/hw/irdma/ctrl.c | 5 +----
drivers/infiniband/hw/irdma/uk.c | 6 ++----
drivers/infiniband/hw/irdma/user.h | 4 ++--
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c
index 729fa8a3f6f8..7264f8c2f7d5 100644
--- a/drivers/infiniband/hw/irdma/ctrl.c
+++ b/drivers/infiniband/hw/irdma/ctrl.c
@@ -2463,7 +2463,6 @@ static inline void irdma_sc_cq_ack(struct irdma_sc_cq *cq)
enum irdma_status_code irdma_sc_cq_init(struct irdma_sc_cq *cq,
struct irdma_cq_init_info *info)
{
- enum irdma_status_code ret_code;
u32 pble_obj_cnt;
pble_obj_cnt = info->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt;
@@ -2475,9 +2474,7 @@ enum irdma_status_code irdma_sc_cq_init(struct irdma_sc_cq *cq,
cq->ceq_id = info->ceq_id;
info->cq_uk_init_info.cqe_alloc_db = cq->dev->cq_arm_db;
info->cq_uk_init_info.cq_ack_db = cq->dev->cq_ack_db;
- ret_code = irdma_uk_cq_init(&cq->cq_uk, &info->cq_uk_init_info);
- if (ret_code)
- return ret_code;
+ irdma_uk_cq_init(&cq->cq_uk, &info->cq_uk_init_info);
cq->virtual_map = info->virtual_map;
cq->pbl_chunk_size = info->pbl_chunk_size;
diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c
index ebcd93bb9e9d..cc578974ad0e 100644
--- a/drivers/infiniband/hw/irdma/uk.c
+++ b/drivers/infiniband/hw/irdma/uk.c
@@ -1446,8 +1446,8 @@ enum irdma_status_code irdma_uk_qp_init(struct irdma_qp_uk *qp,
* @cq: hw cq
* @info: hw cq initialization info
*/
-enum irdma_status_code irdma_uk_cq_init(struct irdma_cq_uk *cq,
- struct irdma_cq_uk_init_info *info)
+void irdma_uk_cq_init(struct irdma_cq_uk *cq,
+ struct irdma_cq_uk_init_info *info)
{
cq->cq_base = info->cq_base;
cq->cq_id = info->cq_id;
@@ -1458,8 +1458,6 @@ enum irdma_status_code irdma_uk_cq_init(struct irdma_cq_uk *cq,
cq->avoid_mem_cflct = info->avoid_mem_cflct;
IRDMA_RING_INIT(cq->cq_ring, cq->cq_size);
cq->polarity = 1;
-
- return 0;
}
/**
diff --git a/drivers/infiniband/hw/irdma/user.h b/drivers/infiniband/hw/irdma/user.h
index 31d5e4e3f442..66e00660fbaa 100644
--- a/drivers/infiniband/hw/irdma/user.h
+++ b/drivers/infiniband/hw/irdma/user.h
@@ -316,8 +316,8 @@ void irdma_uk_cq_request_notification(struct irdma_cq_uk *cq,
enum irdma_cmpl_notify cq_notify);
void irdma_uk_cq_resize(struct irdma_cq_uk *cq, void *cq_base, int size);
void irdma_uk_cq_set_resized_cnt(struct irdma_cq_uk *qp, u16 cnt);
-enum irdma_status_code irdma_uk_cq_init(struct irdma_cq_uk *cq,
- struct irdma_cq_uk_init_info *info);
+void irdma_uk_cq_init(struct irdma_cq_uk *cq,
+ struct irdma_cq_uk_init_info *info);
enum irdma_status_code irdma_uk_qp_init(struct irdma_qp_uk *qp,
struct irdma_qp_uk_init_info *info);
struct irdma_sq_uk_wr_trk_info {
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] RDMA/irdma: remove the check to the returned value of irdma_uk_cq_init
2021-10-19 15:36 ` Saleem, Shiraz
@ 2021-10-19 23:40 ` Yanjun Zhu
0 siblings, 0 replies; 4+ messages in thread
From: Yanjun Zhu @ 2021-10-19 23:40 UTC (permalink / raw)
To: Saleem, Shiraz, yanjun.zhu, Ismail, Mustafa, dledford, jgg,
linux-rdma, leon
在 2021/10/19 23:36, Saleem, Shiraz 写道:
>> Subject: [PATCH 1/1] RDMA/irdma: remove the check to the returned value of
>> irdma_uk_cq_init
>
> Maybe you can condense this to --
>
> RDMA/irdma: Make irdma_uk_cq_init return a void
>
>
>>
>> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>>
>> Since the function irdma_uk_cq_init always returns 0, so remove the check to the
>> returned value of the function irdma_uk_cq_init.
>
> Maybe --
>
> irdma_uk_cq_init always returns 0, so make it a void.
>
>
>>
>> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
>> ---
>> drivers/infiniband/hw/irdma/ctrl.c | 5 +----
>> drivers/infiniband/hw/irdma/uk.c | 6 ++----
>> drivers/infiniband/hw/irdma/user.h | 4 ++--
>> 3 files changed, 5 insertions(+), 10 deletions(-)
>>
>
> Thanks for this!
>
> Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
>
Thanks, Shiraz
Zhu Yanjun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] RDMA/irdma: remove the check to the returned value of irdma_uk_cq_init
2021-10-19 15:37 [PATCH 1/1] RDMA/irdma: remove the check to the returned value of irdma_uk_cq_init yanjun.zhu
2021-10-19 15:36 ` Saleem, Shiraz
@ 2021-10-20 23:03 ` Jason Gunthorpe
1 sibling, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2021-10-20 23:03 UTC (permalink / raw)
To: yanjun.zhu; +Cc: mustafa.ismail, shiraz.saleem, dledford, linux-rdma, leon
On Tue, Oct 19, 2021 at 11:37:17AM -0400, yanjun.zhu@linux.dev wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> Since the function irdma_uk_cq_init always returns 0, so remove the check
> to the returned value of the function irdma_uk_cq_init.
>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
> ---
> drivers/infiniband/hw/irdma/ctrl.c | 5 +----
> drivers/infiniband/hw/irdma/uk.c | 6 ++----
> drivers/infiniband/hw/irdma/user.h | 4 ++--
> 3 files changed, 5 insertions(+), 10 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-20 23:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 15:37 [PATCH 1/1] RDMA/irdma: remove the check to the returned value of irdma_uk_cq_init yanjun.zhu
2021-10-19 15:36 ` Saleem, Shiraz
2021-10-19 23:40 ` Yanjun Zhu
2021-10-20 23:03 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.