linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: elx: efct: Remove redundant initialization of variable ret
@ 2021-08-04 13:24 Colin King
  2021-08-10  3:41 ` Martin K. Petersen
  2021-08-17  3:17 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-08-04 13:24 UTC (permalink / raw)
  To: James Smart, Ram Vegesna, James E . J . Bottomley, linux-scsi,
	target-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable ret is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/elx/efct/efct_lio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/elx/efct/efct_lio.c b/drivers/scsi/elx/efct/efct_lio.c
index e0d798d6baee..bb3b460dc0bc 100644
--- a/drivers/scsi/elx/efct/efct_lio.c
+++ b/drivers/scsi/elx/efct/efct_lio.c
@@ -780,7 +780,7 @@ efct_lio_npiv_make_nport(struct target_fabric_configfs *tf,
 {
 	struct efct_lio_vport *lio_vport;
 	struct efct *efct;
-	int ret = -1;
+	int ret;
 	u64 p_wwpn, npiv_wwpn, npiv_wwnn;
 	char *p, *pbuf, tmp[128];
 	struct efct_lio_vport_list_t *vport_list;
-- 
2.31.1


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

* Re: [PATCH] scsi: elx: efct: Remove redundant initialization of variable ret
  2021-08-04 13:24 [PATCH] scsi: elx: efct: Remove redundant initialization of variable ret Colin King
@ 2021-08-10  3:41 ` Martin K. Petersen
  2021-08-17  3:17 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-08-10  3:41 UTC (permalink / raw)
  To: Colin King
  Cc: James Smart, Ram Vegesna, James E . J . Bottomley, linux-scsi,
	target-devel, kernel-janitors, linux-kernel


Colin,

> The variable ret is being initialized with a value that is never read,
> it is being updated later on. The assignment is redundant and can be
> removed.

Applied to 5.15/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: elx: efct: Remove redundant initialization of variable ret
  2021-08-04 13:24 [PATCH] scsi: elx: efct: Remove redundant initialization of variable ret Colin King
  2021-08-10  3:41 ` Martin K. Petersen
@ 2021-08-17  3:17 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-08-17  3:17 UTC (permalink / raw)
  To: linux-scsi, James Smart, Colin King, Ram Vegesna,
	James E . J . Bottomley, target-devel
  Cc: Martin K . Petersen, kernel-janitors, linux-kernel

On Wed, 4 Aug 2021 14:24:51 +0100, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable ret is being initialized with a value that is never
> read, it is being updated later on. The assignment is redundant and
> can be removed.
> 
> 
> [...]

Applied to 5.15/scsi-queue, thanks!

[1/1] scsi: elx: efct: Remove redundant initialization of variable ret
      https://git.kernel.org/mkp/scsi/c/e71dd41ea002

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-08-17  3:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 13:24 [PATCH] scsi: elx: efct: Remove redundant initialization of variable ret Colin King
2021-08-10  3:41 ` Martin K. Petersen
2021-08-17  3:17 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).