linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: isci: remove set but not used 'index'
@ 2020-08-27 12:58 Jason Yan
  2020-09-09  2:09 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-08-27 12:58 UTC (permalink / raw)
  To: intel-linux-scu, artur.paszkiewicz, jejb, martin.petersen,
	linux-scsi, linux-kernel
  Cc: Jason Yan, Hulk Robot

This addresses the following gcc warning with "make W=1":

drivers/scsi/isci/host.c: In function ‘sci_controller_complete_io’:
drivers/scsi/isci/host.c:2674:6: warning: variable ‘index’ set but not
used [-Wunused-but-set-variable]
 2674 |  u16 index;
      |      ^~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/isci/host.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index 7b5deae68d33..7ebfa3c8cdc7 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -2671,7 +2671,6 @@ enum sci_status sci_controller_complete_io(struct isci_host *ihost,
 					   struct isci_request *ireq)
 {
 	enum sci_status status;
-	u16 index;
 
 	switch (ihost->sm.current_state_id) {
 	case SCIC_STOPPING:
@@ -2682,7 +2681,6 @@ enum sci_status sci_controller_complete_io(struct isci_host *ihost,
 		if (status != SCI_SUCCESS)
 			return status;
 
-		index = ISCI_TAG_TCI(ireq->io_tag);
 		clear_bit(IREQ_ACTIVE, &ireq->flags);
 		return SCI_SUCCESS;
 	default:
-- 
2.25.4


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

* Re: [PATCH] scsi: isci: remove set but not used 'index'
  2020-08-27 12:58 [PATCH] scsi: isci: remove set but not used 'index' Jason Yan
@ 2020-09-09  2:09 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-09-09  2:09 UTC (permalink / raw)
  To: Jason Yan, artur.paszkiewicz, intel-linux-scu, linux-scsi, jejb,
	linux-kernel
  Cc: Martin K . Petersen, Hulk Robot

On Thu, 27 Aug 2020 20:58:51 +0800, Jason Yan wrote:

> This addresses the following gcc warning with "make W=1":
> 
> drivers/scsi/isci/host.c: In function ‘sci_controller_complete_io’:
> drivers/scsi/isci/host.c:2674:6: warning: variable ‘index’ set but not
> used [-Wunused-but-set-variable]
>  2674 |  u16 index;
>       |      ^~~~~

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: isci: Remove set but not used 'index'
      https://git.kernel.org/mkp/scsi/c/7149e0cb31c5

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-09-09  2:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 12:58 [PATCH] scsi: isci: remove set but not used 'index' Jason Yan
2020-09-09  2:09 ` 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).