linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] scsi: qla1280: some code cleanups to shut up robots
@ 2020-09-07  7:45 Jason Yan
  2020-09-07  7:45 ` [PATCH 1/4] scsi: qla1280: remove set but not used variable in qla1280_done() Jason Yan
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jason Yan @ 2020-09-07  7:45 UTC (permalink / raw)
  To: mdr, jejb, martin.petersen, yanaijie, tbogendoerfer, linux-scsi

Continue to address some build warnings to make our robots happy.

Jason Yan (4):
  scsi: qla1280: remove set but not used variable in qla1280_done()
  scsi: qla1280: remove set but not used variable in
    qla1280_nvram_config()
  scsi: qla1280: remove set but not used variable in
    qla1280_mailbox_command()
  scsi: qla1280: remove set but not used variable in
    qla1280_status_entry()

 drivers/scsi/qla1280.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

-- 
2.25.4


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

* [PATCH 1/4] scsi: qla1280: remove set but not used variable in qla1280_done()
  2020-09-07  7:45 [PATCH 0/4] scsi: qla1280: some code cleanups to shut up robots Jason Yan
@ 2020-09-07  7:45 ` Jason Yan
  2020-09-07  7:45 ` [PATCH 2/4] scsi: qla1280: remove set but not used variable in qla1280_nvram_config() Jason Yan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jason Yan @ 2020-09-07  7:45 UTC (permalink / raw)
  To: mdr, jejb, martin.petersen, yanaijie, tbogendoerfer, linux-scsi
  Cc: Hulk Robot

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

drivers/scsi/qla1280.c: In function ‘qla1280_done’:
drivers/scsi/qla1280.c:1244:19: warning: variable ‘lun’ set but not used
[-Wunused-but-set-variable]
 1244 |  int bus, target, lun;
      |                   ^~~

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 441a45349349..42c68bd98fa5 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -1241,7 +1241,7 @@ qla1280_done(struct scsi_qla_host *ha)
 {
 	struct srb *sp;
 	struct list_head *done_q;
-	int bus, target, lun;
+	int bus, target;
 	struct scsi_cmnd *cmd;
 
 	ENTER("qla1280_done");
@@ -1256,7 +1256,6 @@ qla1280_done(struct scsi_qla_host *ha)
 		cmd = sp->cmd;
 		bus = SCSI_BUS_32(cmd);
 		target = SCSI_TCN_32(cmd);
-		lun = SCSI_LUN_32(cmd);
 
 		switch ((CMD_RESULT(cmd) >> 16)) {
 		case DID_RESET:
-- 
2.25.4


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

* [PATCH 2/4] scsi: qla1280: remove set but not used variable in qla1280_nvram_config()
  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 ` Jason Yan
  2020-09-07  7:45 ` [PATCH 3/4] scsi: qla1280: remove set but not used variable in qla1280_mailbox_command() Jason Yan
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jason Yan @ 2020-09-07  7:45 UTC (permalink / raw)
  To: mdr, jejb, martin.petersen, yanaijie, tbogendoerfer, linux-scsi
  Cc: Hulk Robot

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

drivers/scsi/qla1280.c: In function ‘qla1280_nvram_config’:
drivers/scsi/qla1280.c:2188:36: warning: variable ‘ddma_conf’ set but
not used [-Wunused-but-set-variable]
 2188 |   uint16_t hwrev, cfg1, cdma_conf, ddma_conf;
      |                                    ^~~~~~~~~

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 42c68bd98fa5..72f92733e75f 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -2184,13 +2184,12 @@ qla1280_nvram_config(struct scsi_qla_host *ha)
 		nv->cntr_flags_1.disable_loading_risc_code;
 
 	if (IS_ISP1040(ha)) {
-		uint16_t hwrev, cfg1, cdma_conf, ddma_conf;
+		uint16_t hwrev, cfg1, cdma_conf;
 
 		hwrev = RD_REG_WORD(&reg->cfg_0) & ISP_CFG0_HWMSK;
 
 		cfg1 = RD_REG_WORD(&reg->cfg_1) & ~(BIT_4 | BIT_5 | BIT_6);
 		cdma_conf = RD_REG_WORD(&reg->cdma_cfg);
-		ddma_conf = RD_REG_WORD(&reg->ddma_cfg);
 
 		/* Busted fifo, says mjacob. */
 		if (hwrev != ISP_CFG0_1040A)
-- 
2.25.4


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

* [PATCH 3/4] scsi: qla1280: remove set but not used variable in qla1280_mailbox_command()
  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
  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
  4 siblings, 0 replies; 6+ messages in thread
From: Jason Yan @ 2020-09-07  7:45 UTC (permalink / raw)
  To: mdr, jejb, martin.petersen, yanaijie, tbogendoerfer, linux-scsi
  Cc: Hulk Robot

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


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

* [PATCH 4/4] scsi: qla1280: remove set but not used variable in qla1280_status_entry()
  2020-09-07  7:45 [PATCH 0/4] scsi: qla1280: some code cleanups to shut up robots Jason Yan
                   ` (2 preceding siblings ...)
  2020-09-07  7:45 ` [PATCH 3/4] scsi: qla1280: remove set but not used variable in qla1280_mailbox_command() Jason Yan
@ 2020-09-07  7:45 ` Jason Yan
  2020-09-10  2:38 ` [PATCH 0/4] scsi: qla1280: some code cleanups to shut up robots Martin K. Petersen
  4 siblings, 0 replies; 6+ messages in thread
From: Jason Yan @ 2020-09-07  7:45 UTC (permalink / raw)
  To: mdr, jejb, martin.petersen, yanaijie, tbogendoerfer, linux-scsi
  Cc: Hulk Robot

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

drivers/scsi/qla1280.c: In function ‘qla1280_status_entry’:
drivers/scsi/qla1280.c:3607:28: warning: variable ‘lun’ set but not used
[-Wunused-but-set-variable]
 3607 |  unsigned int bus, target, lun;
      |                            ^~~
drivers/scsi/qla1280.c:3607:20: warning: variable ‘target’ set but not
used [-Wunused-but-set-variable]
 3607 |  unsigned int bus, target, lun;
      |                    ^~~~~~
drivers/scsi/qla1280.c:3607:15: warning: variable ‘bus’ set but not used
[-Wunused-but-set-variable]
 3607 |  unsigned int bus, target, lun;
      |               ^~~

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

diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index fe4b88aaf5cb..545936cb3980 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -3601,7 +3601,6 @@ static void
 qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt,
 		     struct list_head *done_q)
 {
-	unsigned int bus, target, lun;
 	int sense_sz;
 	struct srb *sp;
 	struct scsi_cmnd *cmd;
@@ -3627,11 +3626,6 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt,
 
 	cmd = sp->cmd;
 
-	/* Generate LU queue on cntrl, target, LUN */
-	bus = SCSI_BUS_32(cmd);
-	target = SCSI_TCN_32(cmd);
-	lun = SCSI_LUN_32(cmd);
-
 	if (comp_status || scsi_status) {
 		dprintk(3, "scsi: comp_status = 0x%x, scsi_status = "
 			"0x%x, handle = 0x%x\n", comp_status,
@@ -3670,7 +3664,8 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt,
 
 			dprintk(2, "qla1280_status_entry: Check "
 				"condition Sense data, b %i, t %i, "
-				"l %i\n", bus, target, lun);
+				"l %i\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd),
+				SCSI_LUN_32(cmd));
 			if (sense_sz)
 				qla1280_dump_buffer(2,
 						    (char *)cmd->sense_buffer,
-- 
2.25.4


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

* Re: [PATCH 0/4] scsi: qla1280: some code cleanups to shut up robots
  2020-09-07  7:45 [PATCH 0/4] scsi: qla1280: some code cleanups to shut up robots Jason Yan
                   ` (3 preceding siblings ...)
  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 ` Martin K. Petersen
  4 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2020-09-10  2:38 UTC (permalink / raw)
  To: Jason Yan; +Cc: mdr, jejb, martin.petersen, tbogendoerfer, linux-scsi


Jason,

> Continue to address some build warnings to make our robots happy.
>
> Jason Yan (4):
>   scsi: qla1280: remove set but not used variable in qla1280_done()
>   scsi: qla1280: remove set but not used variable in
>     qla1280_nvram_config()
>   scsi: qla1280: remove set but not used variable in
>     qla1280_mailbox_command()
>   scsi: qla1280: remove set but not used variable in
>     qla1280_status_entry()

Applied to the 5.10 staging tree. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 3/4] scsi: qla1280: remove set but not used variable in qla1280_mailbox_command() Jason Yan
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

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).