Re: [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'

2020-07-14 Thread Hannes Reinecke

On 7/13/20 9:46 AM, Lee Jones wrote:

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;
  | ^~~~

Cc: Hannes Reinecke 
Cc: "Daniel M. Eischen" 
Cc: Doug Ledford 
Signed-off-by: Lee Jones 
---
  drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 --
  1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c 
b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index cc4c7b1781466..ed437c16de881 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -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)


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer


[PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'

2020-07-13 Thread Lee Jones
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;
 | ^~~~

Cc: Hannes Reinecke 
Cc: "Daniel M. Eischen" 
Cc: Doug Ledford 
Signed-off-by: Lee Jones 
---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c 
b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index cc4c7b1781466..ed437c16de881 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -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)
-- 
2.25.1