All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] IB/qib: remove unused variable ret
@ 2020-04-13  2:42 Zou Wei
  2020-04-14 19:35 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Zou Wei @ 2020-04-13  2:42 UTC (permalink / raw)
  To: dennis.dalessandro, mike.marciniszyn, dledford, jgg, linux-rdma,
	linux-kernel
  Cc: Zou Wei

This patch fixes below warnings reported by coccicheck

drivers/infiniband/hw/qib/qib_iba7322.c:6878:8-11:
Unneeded variable: "ret". Return "0" on line 6907
drivers/infiniband/hw/qib/qib_iba7322.c:2378:5-8:
Unneeded variable: "ret". Return "0" on line 2513

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 drivers/infiniband/hw/qib/qib_iba7322.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index 91d64dd..8bcbc88 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -2375,7 +2375,6 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd)
 	struct qib_devdata *dd = ppd->dd;
 	u64 val, guid, ibc;
 	unsigned long flags;
-	int ret = 0;
 
 	/*
 	 * SerDes model not in Pd, but still need to
@@ -2510,7 +2509,7 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd)
 		val | ERR_MASK_N(IBStatusChanged));
 
 	/* Always zero until we start messing with SerDes for real */
-	return ret;
+	return 0;
 }
 
 /**
@@ -6875,7 +6874,7 @@ static int init_sdma_7322_regs(struct qib_pportdata *ppd)
 	struct qib_devdata *dd = ppd->dd;
 	unsigned lastbuf, erstbuf;
 	u64 senddmabufmask[3] = { 0 };
-	int n, ret = 0;
+	int n;
 
 	qib_write_kreg_port(ppd, krp_senddmabase, ppd->sdma_descq_phys);
 	qib_sdma_7322_setlengen(ppd);
@@ -6904,7 +6903,7 @@ static int init_sdma_7322_regs(struct qib_pportdata *ppd)
 	qib_write_kreg_port(ppd, krp_senddmabufmask0, senddmabufmask[0]);
 	qib_write_kreg_port(ppd, krp_senddmabufmask1, senddmabufmask[1]);
 	qib_write_kreg_port(ppd, krp_senddmabufmask2, senddmabufmask[2]);
-	return ret;
+	return 0;
 }
 
 /* sdma_lock must be held */
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] IB/qib: remove unused variable ret
  2020-04-13  2:42 [PATCH -next] IB/qib: remove unused variable ret Zou Wei
@ 2020-04-14 19:35 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-04-14 19:35 UTC (permalink / raw)
  To: Zou Wei
  Cc: dennis.dalessandro, mike.marciniszyn, dledford, linux-rdma, linux-kernel

On Mon, Apr 13, 2020 at 10:42:04AM +0800, Zou Wei wrote:
> This patch fixes below warnings reported by coccicheck
> 
> drivers/infiniband/hw/qib/qib_iba7322.c:6878:8-11:
> Unneeded variable: "ret". Return "0" on line 6907
> drivers/infiniband/hw/qib/qib_iba7322.c:2378:5-8:
> Unneeded variable: "ret". Return "0" on line 2513
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> ---
>  drivers/infiniband/hw/qib/qib_iba7322.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-14 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13  2:42 [PATCH -next] IB/qib: remove unused variable ret Zou Wei
2020-04-14 19:35 ` 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.