diff mbox series

[2/3] scsi: aic7xxx: remove set but not used variables 'ahc','targ'

Message ID 1566482685-117305-3-git-send-email-zhengbin13@huawei.com (mailing list archive)
State Deferred
Headers show
Series scsi: aic7xxx: remove some set but not used variables | expand

Commit Message

Zheng Bin Aug. 22, 2019, 2:04 p.m. UTC
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 <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 6 ------
 1 file changed, 6 deletions(-)

--
2.7.4
diff mbox series

Patch

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)