kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] scsi: elx: efct: remove redundant initialization of variable lun
@ 2021-06-16 17:16 Colin King
  2021-06-18 22:50 ` James Smart
  2021-06-19  2:24 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-06-16 17:16 UTC (permalink / raw)
  To: James Smart, Ram Vegesna, James E . J . Bottomley,
	Martin K . Petersen, Hannes Reinecke, linux-scsi, target-devel
  Cc: kernel-janitors, linux-kernel

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

The variable lun 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_unsol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/elx/efct/efct_unsol.c b/drivers/scsi/elx/efct/efct_unsol.c
index a9384c9acfde..e6addab66a60 100644
--- a/drivers/scsi/elx/efct/efct_unsol.c
+++ b/drivers/scsi/elx/efct/efct_unsol.c
@@ -342,7 +342,7 @@ efct_dispatch_fcp_cmd(struct efct_node *node, struct efc_hw_sequence *seq)
 	struct fc_frame_header *fchdr = seq->header->dma.virt;
 	struct fcp_cmnd	*cmnd = NULL;
 	struct efct_io *io = NULL;
-	u32 lun = U32_MAX;
+	u32 lun;
 
 	if (!seq->payload) {
 		efc_log_err(efct, "Sequence payload is NULL.\n");
-- 
2.31.1


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

* Re: [PATCH][next] scsi: elx: efct: remove redundant initialization of variable lun
  2021-06-16 17:16 [PATCH][next] scsi: elx: efct: remove redundant initialization of variable lun Colin King
@ 2021-06-18 22:50 ` James Smart
  2021-06-19  2:24 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: James Smart @ 2021-06-18 22:50 UTC (permalink / raw)
  To: Colin King, James Smart, Ram Vegesna, James E . J . Bottomley,
	Martin K . Petersen, Hannes Reinecke, linux-scsi, target-devel
  Cc: kernel-janitors, linux-kernel

On 6/16/2021 10:16 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable lun 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_unsol.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

Thanks

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james


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

* Re: [PATCH][next] scsi: elx: efct: remove redundant initialization of variable lun
  2021-06-16 17:16 [PATCH][next] scsi: elx: efct: remove redundant initialization of variable lun Colin King
  2021-06-18 22:50 ` James Smart
@ 2021-06-19  2:24 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-06-19  2:24 UTC (permalink / raw)
  To: Colin King
  Cc: James Smart, Ram Vegesna, James E . J . Bottomley,
	Martin K . Petersen, Hannes Reinecke, linux-scsi, target-devel,
	kernel-janitors, linux-kernel


Colin,

> The variable lun 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.14/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-06-19  2:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 17:16 [PATCH][next] scsi: elx: efct: remove redundant initialization of variable lun Colin King
2021-06-18 22:50 ` James Smart
2021-06-19  2:24 ` 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).