Fixes gcc '-Wunused-but-set-variable' warning:

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]
drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ahc_send_async:
drivers/scsi/aic7xxx/aic7xxx_osm.c:1611:28: warning: variable targ set but not 
used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hul...@huawei.com>
Signed-off-by: zhengbin <zhengbi...@huawei.com>
---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c 
b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index d5c4a0d..57041cc 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -671,10 +671,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");

@@ -1608,7 +1604,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
        case AC_TRANSFER_NEG:
        {
                struct  scsi_target *starget;
-               struct  ahc_linux_target *targ;
                struct  ahc_initiator_tinfo *tinfo;
                struct  ahc_tmode_tstate *tstate;
                int     target_offset;
@@ -1642,7 +1637,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
                starget = ahc->platform_data->starget[target_offset];
                if (starget == NULL)
                        break;
-               targ = scsi_transport_target_data(starget);

                target_ppr_options =
                        (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
--
2.7.4

Reply via email to