diff mbox series

[v2,19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc'

Message ID 20200713074645.126138-20-lee.jones@linaro.org (mailing list archive)
State Accepted
Headers show
Series Fix a bunch more SCSI related W=1 warnings | expand

Commit Message

Lee Jones July 13, 2020, 7:46 a.m. UTC
Looks as though 'ahc' hasn't been used since 2005.

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

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set but not used [-Wunused-but-set-variable]
 674 | struct ahc_softc *ahc;
 | ^~~

Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Hannes Reinecke July 14, 2020, 7:07 a.m. UTC | #1
On 7/13/20 9:46 AM, Lee Jones wrote:
> Looks as though 'ahc' hasn't been used since 2005.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’:
>   drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set but not used [-Wunused-but-set-variable]
>   674 | struct ahc_softc *ahc;
>   | ^~~
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
> Cc: Doug Ledford <dledford@redhat.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> index 32bfe20d79cc1..cc4c7b1781466 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -666,10 +666,6 @@ ahc_linux_slave_alloc(struct scsi_device *sdev)
>   static int
>   ahc_linux_slave_configure(struct scsi_device *sdev)
>   {
> -	struct	ahc_softc *ahc;
> -
> -	ahc = *((struct ahc_softc **)sdev->host->hostdata);
> -
>   	if (bootverbose)
>   		sdev_printk(KERN_INFO, sdev, "Slave Configure\n");
>   
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 32bfe20d79cc1..cc4c7b1781466 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -666,10 +666,6 @@  ahc_linux_slave_alloc(struct scsi_device *sdev)
 static int
 ahc_linux_slave_configure(struct scsi_device *sdev)
 {
-	struct	ahc_softc *ahc;
-
-	ahc = *((struct ahc_softc **)sdev->host->hostdata);
-
 	if (bootverbose)
 		sdev_printk(KERN_INFO, sdev, "Slave Configure\n");