Linux-SCSI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] scsi: isci: remove redundant initialization of variable status
@ 2020-07-23 14:26 Colin King
  2020-07-25  2:50 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-07-23 14:26 UTC (permalink / raw)
  To: Intel SCU Linux support, Artur Paszkiewicz,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

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

The variable status is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

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

diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 343d24c7e788..6561a07db189 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -3444,7 +3444,7 @@ struct isci_request *isci_tmf_request_from_tag(struct isci_host *ihost,
 int isci_request_execute(struct isci_host *ihost, struct isci_remote_device *idev,
 			 struct sas_task *task, u16 tag)
 {
-	enum sci_status status = SCI_FAILURE_UNSUPPORTED_PROTOCOL;
+	enum sci_status status;
 	struct isci_request *ireq;
 	unsigned long flags;
 	int ret = 0;
-- 
2.27.0


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

* Re: [PATCH] scsi: isci: remove redundant initialization of variable status
  2020-07-23 14:26 [PATCH] scsi: isci: remove redundant initialization of variable status Colin King
@ 2020-07-25  2:50 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-07-25  2:50 UTC (permalink / raw)
  To: Artur Paszkiewicz, linux-scsi, James E . J . Bottomley,
	Intel SCU Linux support, Colin King
  Cc: Martin K . Petersen, linux-kernel, kernel-janitors

On Thu, 23 Jul 2020 15:26:14 +0100, Colin King wrote:

> The variable status is being initialized with a value that is never read
> and it is being updated later with a new value.  The initialization is
> redundant and can be removed.

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: isci: Remove redundant initialization of variable 'status'
      https://git.kernel.org/mkp/scsi/c/584d902eb10e

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 14:26 [PATCH] scsi: isci: remove redundant initialization of variable status Colin King
2020-07-25  2:50 ` Martin K. Petersen

Linux-SCSI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-scsi/0 linux-scsi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-scsi linux-scsi/ https://lore.kernel.org/linux-scsi \
		linux-scsi@vger.kernel.org
	public-inbox-index linux-scsi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-scsi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git