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

drivers/scsi/aic7xxx/aic79xx_osm.c: In function ahd_linux_slave_configure:
drivers/scsi/aic7xxx/aic79xx_osm.c:703:20: warning: variable ahd set but not 
used [-Wunused-but-set-variable]
drivers/scsi/aic7xxx/aic79xx_osm.c: In function ahd_linux_dev_reset:
drivers/scsi/aic7xxx/aic79xx_osm.c:789:9: warning: variable wait set but not 
used [-Wunused-but-set-variable]
drivers/scsi/aic7xxx/aic79xx_osm.c: In function ahd_linux_dev_reset:
drivers/scsi/aic7xxx/aic79xx_osm.c:788:9: warning: variable paused set but not 
used [-Wunused-but-set-variable]
drivers/scsi/aic7xxx/aic79xx_osm.c: In function ahd_linux_queue_abort_cmd:
drivers/scsi/aic7xxx/aic79xx_osm.c:2155:9: warning: variable saved_scsiid 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/aic79xx_osm.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c 
b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 5799251..18ca82f 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -700,9 +700,6 @@ ahd_linux_slave_alloc(struct scsi_device *sdev)
 static int
 ahd_linux_slave_configure(struct scsi_device *sdev)
 {
-       struct  ahd_softc *ahd;
-
-       ahd = *((struct ahd_softc **)sdev->host->hostdata);
        if (bootverbose)
                sdev_printk(KERN_INFO, sdev, "Slave Configure\n");

@@ -785,16 +782,12 @@ 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,
@@ -2152,7 +2145,6 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
        u_int  saved_scbptr;
        u_int  active_scbptr;
        u_int  last_phase;
-       u_int  saved_scsiid;
        u_int  cdb_byte;
        int    retval;
        int    was_paused;
@@ -2268,7 +2260,6 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
         * passed in command.  That command is currently active on the
         * bus or is in the disconnected state.
         */
-       saved_scsiid = ahd_inb(ahd, SAVED_SCSIID);
        if (last_phase != P_BUSFREE
            && SCB_GET_TAG(pending_scb) == active_scbptr) {

--
2.7.4

Reply via email to