All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Yan <yanaijie@huawei.com>
To: <mdr@sgi.com>, <jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
	<yanaijie@huawei.com>, <tbogendoerfer@suse.de>,
	<linux-scsi@vger.kernel.org>
Cc: Hulk Robot <hulkci@huawei.com>
Subject: [PATCH 3/4] scsi: qla1280: remove set but not used variable in qla1280_mailbox_command()
Date: Mon, 7 Sep 2020 15:45:17 +0800	[thread overview]
Message-ID: <20200907074518.2326360-4-yanaijie@huawei.com> (raw)
In-Reply-To: <20200907074518.2326360-1-yanaijie@huawei.com>

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

drivers/scsi/qla1280.c: In function ‘qla1280_mailbox_command’:
drivers/scsi/qla1280.c:2430:11: warning: variable ‘data’ set but not
used [-Wunused-but-set-variable]
 2430 |  uint16_t data;
      |           ^~~~

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

diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 72f92733e75f..fe4b88aaf5cb 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -2425,7 +2425,6 @@ qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb)
 	int cnt;
 	uint16_t *optr, *iptr;
 	uint16_t __iomem *mptr;
-	uint16_t data;
 	DECLARE_COMPLETION_ONSTACK(wait);
 
 	ENTER("qla1280_mailbox_command");
@@ -2460,7 +2459,7 @@ qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb)
 
 	spin_unlock_irq(ha->host->host_lock);
 	WRT_REG_WORD(&reg->host_cmd, HC_SET_HOST_INT);
-	data = qla1280_debounce_register(&reg->istatus);
+	qla1280_debounce_register(&reg->istatus);
 
 	wait_for_completion(&wait);
 	del_timer_sync(&ha->mailbox_timer);
-- 
2.25.4


  parent reply	other threads:[~2020-09-07  7:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  7:45 [PATCH 0/4] scsi: qla1280: some code cleanups to shut up robots Jason Yan
2020-09-07  7:45 ` [PATCH 1/4] scsi: qla1280: remove set but not used variable in qla1280_done() Jason Yan
2020-09-07  7:45 ` [PATCH 2/4] scsi: qla1280: remove set but not used variable in qla1280_nvram_config() Jason Yan
2020-09-07  7:45 ` Jason Yan [this message]
2020-09-07  7:45 ` [PATCH 4/4] scsi: qla1280: remove set but not used variable in qla1280_status_entry() Jason Yan
2020-09-10  2:38 ` [PATCH 0/4] scsi: qla1280: some code cleanups to shut up robots Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200907074518.2326360-4-yanaijie@huawei.com \
    --to=yanaijie@huawei.com \
    --cc=hulkci@huawei.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mdr@sgi.com \
    --cc=tbogendoerfer@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.