scsi: aic7xxx: Remove unused variable 'targ'
authorLee Jones <lee.jones@linaro.org>
Mon, 13 Jul 2020 07:46:36 +0000 (08:46 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 15 Jul 2020 20:01:58 +0000 (16:01 -0400)
Looks like checking the 'targ' was removed in 2005.

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

 drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’:
 drivers/scsi/aic7xxx/aic7xxx_osm.c:1604:28: warning: variable ‘targ’ set but not used [-Wunused-but-set-variable]
 1604 | struct ahc_linux_target *targ;
 | ^~~~

Link: https://lore.kernel.org/r/20200713074645.126138-21-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Cc: "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
Cc: Doug Ledford <dledford@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aic7xxx/aic7xxx_osm.c

index cc4c7b17814665794d21528f5ef58bf233d8a131..ed437c16de881b080f42f2e8d3ad32942cf83d8b 100644 (file)
@@ -1592,7 +1592,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;
@@ -1626,7 +1625,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)