diff mbox series

[v2,22/24] scsi: aic7xxx: aic79xx_osm: Remove unused variables 'wait' and 'paused'

Message ID 20200713080001.128044-23-lee.jones@linaro.org
State New
Headers show
Series Set 3: Fix another set of SCSI related W=1 warnings | expand

Commit Message

Lee Jones July 13, 2020, 7:59 a.m. UTC
It looks like they have never actually been used.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_dev_reset’:
 drivers/scsi/aic7xxx/aic79xx_osm.c:782:9: warning: variable ‘wait’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/aic7xxx/aic79xx_osm.c:781:9: warning: variable ‘paused’ set but not used [-Wunused-but-set-variable]

Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/scsi/aic7xxx/aic79xx_osm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

-- 
2.25.1

Comments

Hannes Reinecke July 14, 2020, 7:47 a.m. UTC | #1
On 7/13/20 9:59 AM, Lee Jones wrote:
> It looks like they have never actually been used.

> 

> Fixes the following W=1 kernel build warning(s):

> 

>  drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_dev_reset’:

>  drivers/scsi/aic7xxx/aic79xx_osm.c:782:9: warning: variable ‘wait’ set but not used [-Wunused-but-set-variable]

>  drivers/scsi/aic7xxx/aic79xx_osm.c:781:9: warning: variable ‘paused’ set but not used [-Wunused-but-set-variable]

> 

> Cc: Hannes Reinecke <hare@suse.com>

> Signed-off-by: Lee Jones <lee.jones@linaro.org>

> ---

>  drivers/scsi/aic7xxx/aic79xx_osm.c | 5 +----

>  1 file changed, 1 insertion(+), 4 deletions(-)

> 

> diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c

> index 9235b6283c0b3..8e43ff86e0a60 100644

> --- a/drivers/scsi/aic7xxx/aic79xx_osm.c

> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c

> @@ -775,16 +775,13 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd)

>  	struct scb *reset_scb;

>  	u_int  cdb_byte;

>  	int    retval = SUCCESS;

> -	int    paused;

> -	int    wait;

>  	struct	ahd_initiator_tinfo *tinfo;

>  	struct	ahd_tmode_tstate *tstate;

>  	unsigned long flags;

>  	DECLARE_COMPLETION_ONSTACK(done);

>  

>  	reset_scb = NULL;

> -	paused = FALSE;

> -	wait = FALSE;

> +

>  	ahd = *(struct ahd_softc **)cmd->device->host->hostdata;

>  

>  	scmd_printk(KERN_INFO, cmd,

> 

Reviewed-by: Hannes Reinecke <hare@suse.de>


Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer
diff mbox series

Patch

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 9235b6283c0b3..8e43ff86e0a60 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -775,16 +775,13 @@  ahd_linux_dev_reset(struct scsi_cmnd *cmd)
 	struct scb *reset_scb;
 	u_int  cdb_byte;
 	int    retval = SUCCESS;
-	int    paused;
-	int    wait;
 	struct	ahd_initiator_tinfo *tinfo;
 	struct	ahd_tmode_tstate *tstate;
 	unsigned long flags;
 	DECLARE_COMPLETION_ONSTACK(done);
 
 	reset_scb = NULL;
-	paused = FALSE;
-	wait = FALSE;
+
 	ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
 
 	scmd_printk(KERN_INFO, cmd,