Skip to contentSkip to conversation

RDMA/irdma: change the returned type to void

PATCH Applied [email protected] 4 participants 4 messages Jul 7, 2021 – Jul 12, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/irdma: change the returned type to void

From: Zhu Yanjun <[email protected]>

Since the function irdma_sc_parse_fpm_commit_buf always returns 0, remove the returned value check and change the returned type to void.

Fixes 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs")
---
 drivers/infiniband/hw/irdma/ctrl.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/infiniband/hw/irdma/ctrl.c +4 -5
index b1023a7d0bd1..c3880a85e255 100644
@@ -2845,7 +2845,7 @@ static u64 irdma_sc_decode_fpm_commit(struct irdma_sc_dev *dev, __le64 *buf,
  * parses fpm commit info and copy base value
  * of hmc objects in hmc_info
  */
-static enum irdma_status_code
+static void
 irdma_sc_parse_fpm_commit_buf(struct irdma_sc_dev *dev, __le64 *buf,
 			      struct irdma_hmc_obj_info *info, u32 *sd)
 {
@@ -2915,7 +2915,6 @@ irdma_sc_parse_fpm_commit_buf(struct irdma_sc_dev *dev, __le64 *buf,
 	else
 		*sd = (u32)(size >> 21);
 
-	return 0;
 }
 
 /**
@@ -4434,9 +4433,9 @@ static enum irdma_status_code irdma_sc_cfg_iw_fpm(struct irdma_sc_dev *dev,
 	ret_code = irdma_sc_commit_fpm_val(dev->cqp, 0, hmc_info->hmc_fn_id,
 					   &commit_fpm_mem, true, wait_type);
 	if (!ret_code)
-		ret_code = irdma_sc_parse_fpm_commit_buf(dev, dev->fpm_commit_buf,
-							 hmc_info->hmc_obj,
-							 &hmc_info->sd_table.sd_cnt);
+		irdma_sc_parse_fpm_commit_buf(dev, dev->fpm_commit_buf,
+					      hmc_info->hmc_obj,
+					      &hmc_info->sd_table.sd_cnt);
 	print_hex_dump_debug("HMC: COMMIT FPM BUFFER", DUMP_PREFIX_OFFSET, 16,
 			     8, commit_fpm_mem.va, IRDMA_COMMIT_FPM_BUF_SIZE,
 			     false);
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · On 7 Jul 2021, at 17:24, [email protected] wrote:

From: Zhu Yanjun <[email protected]>

Since the function irdma_sc_parse_fpm_commit_buf always returns 0, remove the returned value check and change the returned type to void.

Fixes 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs")
Quoted 41 lines

---
drivers/infiniband/hw/irdma/ctrl.c | 9 ++++-----

1 file changed, 4 insertions(+), 5 deletions(-)
drivers/infiniband/hw/irdma/ctrl.c +4 -5
index b1023a7d0bd1..c3880a85e255 100644
@@ -2845,7 +2845,7 @@ static u64 irdma_sc_decode_fpm_commit(struct irdma_sc_dev *dev, __le64 *buf,
 * parses fpm commit info and copy base value
 * of hmc objects in hmc_info
 */
-static enum irdma_status_code
+static void
 irdma_sc_parse_fpm_commit_buf(struct irdma_sc_dev *dev, __le64 *buf,
                 struct irdma_hmc_obj_info *info, u32 *sd)
 {
@@ -2915,7 +2915,6 @@ irdma_sc_parse_fpm_commit_buf(struct irdma_sc_dev *dev, __le64 *buf,
   else
       *sd = (u32)(size >> 21);
 
-    return 0;
 }
 
 /**
@@ -4434,9 +4433,9 @@ static enum irdma_status_code irdma_sc_cfg_iw_fpm(struct irdma_sc_dev *dev,
   ret_code = irdma_sc_commit_fpm_val(dev->cqp, 0, hmc_info->hmc_fn_id,
                      &commit_fpm_mem, true, wait_type);
   if (!ret_code)
-        ret_code = irdma_sc_parse_fpm_commit_buf(dev, dev->fpm_commit_buf,
-                             hmc_info->hmc_obj,
-                             &hmc_info->sd_table.sd_cnt);
+        irdma_sc_parse_fpm_commit_buf(dev, dev->fpm_commit_buf,
+                          hmc_info->hmc_obj,
+                          &hmc_info->sd_table.sd_cnt);
   print_hex_dump_debug("HMC: COMMIT FPM BUFFER", DUMP_PREFIX_OFFSET, 16,
                8, commit_fpm_mem.va, IRDMA_COMMIT_FPM_BUF_SIZE,
                false);
Signature · 1 line
2.27.0
maintainer Acked-by
#2 lore raw
Quoted 64 lines

-----Original Message-----
From: Majd Dibbiny <[email protected]>
Sent: Wednesday, July 7, 2021 7:33 AM
To: [email protected]
Cc: [email protected]; Ismail, Mustafa <[email protected]>; Saleem, Shiraz <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] RDMA/irdma: change the returned type to void

Quoted 9 lines · On 7 Jul 2021, at 17:24, [email protected] wrote:

From: Zhu Yanjun <[email protected]>

Since the function irdma_sc_parse_fpm_commit_buf always returns 0, remove the returned value check and change the returned type to void.

Fixes 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs")
Quoted 16 lines

---
drivers/infiniband/hw/irdma/ctrl.c | 9 ++++-----

1 file changed, 4 insertions(+), 5 deletions(-)
drivers/infiniband/hw/irdma/ctrl.c +1 -1
index b1023a7d0bd1..c3880a85e255 100644
@@ -2845,7 +2845,7 @@ static u64 irdma_sc_decode_fpm_commit(struct
 irdma_sc_dev *dev, __le64 *buf,
 * parses fpm commit info and copy base value
 * of hmc objects in hmc_info
 */
-static enum irdma_status_code
+static void
Quoted 1 line

irdma_sc_parse_fpm_commit_buf(struct irdma_sc_dev *dev, __le64

*buf,

Quoted 2 lines
                 struct irdma_hmc_obj_info *info, u32 *sd) { @@

-2915,7 +2915,6 @@ irdma_sc_parse_fpm_commit_buf(struct

irdma_sc_dev *dev, __le64 *buf,

drivers/infiniband/hw/irdma/ctrl.c static enum irdma_status_code

Quoted 8 lines
   else
       *sd = (u32)(size >> 21);

- return 0;
}

/**

drivers/infiniband/hw/irdma/ctrl.c +0 -0
@@ -4434,9 +4433,9 @@ static enum irdma_status_code

irdma_sc_cfg_iw_fpm(struct irdma_sc_dev *dev,

drivers/infiniband/hw/irdma/ctrl.c static enum irdma_status_code irdma_sc_cfg_iw_fpm(struct irdma_sc_dev *dev,

Quoted 12 lines
drivers/infiniband/hw/irdma/ctrl.c +3 -3
   ret_code = irdma_sc_commit_fpm_val(dev->cqp, 0, hmc_info-
 hmc_fn_id,
                      &commit_fpm_mem, true, wait_type);
   if (!ret_code)
-        ret_code = irdma_sc_parse_fpm_commit_buf(dev, dev-
 fpm_commit_buf,
-                             hmc_info->hmc_obj,
-                             &hmc_info->sd_table.sd_cnt);
+        irdma_sc_parse_fpm_commit_buf(dev, dev->fpm_commit_buf,
+                          hmc_info->hmc_obj,
+                          &hmc_info->sd_table.sd_cnt);
   print_hex_dump_debug("HMC: COMMIT FPM BUFFER",
Quoted 6 lines

DUMP_PREFIX_OFFSET, 16,

Quoted 5 lines

8, commit_fpm_mem.va, IRDMA_COMMIT_FPM_BUF_SIZE, false);
--
2.27.0

maintainer Applied
#3 lore raw
In reply to [email protected]
Quoted 5 lines · On Thu, Jul 08, 2021 at 02:47:52AM -0400, [email protected] wrote:

From: Zhu Yanjun <[email protected]>

Since the function irdma_sc_parse_fpm_commit_buf always returns 0, remove the returned value check and change the returned type to void.

Quoted 7 lines
Fixes 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs")
---
 drivers/infiniband/hw/irdma/ctrl.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Applied to for-rc, thanks

Jason