2020-07-13 07:49:28

by Lee Jones

[permalink] [raw]
Subject: [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'

Looks like none of the artifact from ahc_fetch_transinfo() are used anymore.

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

drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_target_alloc’:
drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable]
567 | struct ahc_initiator_tinfo *tinfo;
| ^~~~~

Cc: Hannes Reinecke <[email protected]>
Cc: "Daniel M. Eischen" <[email protected]>
Cc: Doug Ledford <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
drivers/scsi/aic7xxx/aic7xxx_osm.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 2edfa0594f183..32bfe20d79cc1 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -564,8 +564,6 @@ ahc_linux_target_alloc(struct scsi_target *starget)
struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget);
unsigned short scsirate;
struct ahc_devinfo devinfo;
- struct ahc_initiator_tinfo *tinfo;
- struct ahc_tmode_tstate *tstate;
char channel = starget->channel + 'A';
unsigned int our_id = ahc->our_id;
unsigned int target_offset;
@@ -612,9 +610,6 @@ ahc_linux_target_alloc(struct scsi_target *starget)
spi_max_offset(starget) = 0;
spi_min_period(starget) =
ahc_find_period(ahc, scsirate, maxsync);
-
- tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
- starget->id, &tstate);
}
ahc_compile_devinfo(&devinfo, our_id, starget->id,
CAM_LUN_WILDCARD, channel,
--
2.25.1


2020-07-14 16:27:23

by Doug Ledford

[permalink] [raw]
Subject: Re: [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'

On Mon, 2020-07-13 at 08:46 +0100, Lee Jones wrote:
> Looks like none of the artifact from ahc_fetch_transinfo() are used
> anymore.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/scsi/aic7xxx/aic7xxx_osm.c: In function
> ‘ahc_linux_target_alloc’:
> drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’
> set but not used [-Wunused-but-set-variable]
> 567 | struct ahc_initiator_tinfo *tinfo;
> | ^~~~~
>
> Cc: Hannes Reinecke <[email protected]>
> Cc: "Daniel M. Eischen" <[email protected]>
> Cc: Doug Ledford <[email protected]>

FWIW, I can't seem to figure out how you got mine or Dan's email
addresses as related to this driver. The MAINTAINERS file only lists
Hannes. The driver Dan and I worked on was a different driver. It was
named aic7xxx, but that was back in the 1990s. It was renamed to
aic7xxx_old so that Adaptec could contribute this driver you are
currently patching back around 2001 or so. And then maybe around 2010
or something like that, the aic7xxx_old driver that Dan and I worked on
was removed from the upstream source tree entirely. So, just out of
curiosity, how did you get mine and Dan's email addresses to put on the
Cc: list for these patches?

> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/scsi/aic7xxx/aic7xxx_osm.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> index 2edfa0594f183..32bfe20d79cc1 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -564,8 +564,6 @@ ahc_linux_target_alloc(struct scsi_target
> *starget)
> struct scsi_target **ahc_targp =
> ahc_linux_target_in_softc(starget);
> unsigned short scsirate;
> struct ahc_devinfo devinfo;
> - struct ahc_initiator_tinfo *tinfo;
> - struct ahc_tmode_tstate *tstate;
> char channel = starget->channel + 'A';
> unsigned int our_id = ahc->our_id;
> unsigned int target_offset;
> @@ -612,9 +610,6 @@ ahc_linux_target_alloc(struct scsi_target
> *starget)
> spi_max_offset(starget) = 0;
> spi_min_period(starget) =
> ahc_find_period(ahc, scsirate, maxsync);
> -
> - tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
> - starget->id, &tstate);
> }
> ahc_compile_devinfo(&devinfo, our_id, starget->id,
> CAM_LUN_WILDCARD, channel,

--
Doug Ledford <[email protected]>
GPG KeyID: B826A3330E572FDD
Fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD


Attachments:
signature.asc (849.00 B)
This is a digitally signed message part

2020-07-14 21:17:59

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'

On Tue, 14 Jul 2020, Doug Ledford wrote:

> On Mon, 2020-07-13 at 08:46 +0100, Lee Jones wrote:
> > Looks like none of the artifact from ahc_fetch_transinfo() are used
> > anymore.
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/scsi/aic7xxx/aic7xxx_osm.c: In function
> > ‘ahc_linux_target_alloc’:
> > drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’
> > set but not used [-Wunused-but-set-variable]
> > 567 | struct ahc_initiator_tinfo *tinfo;
> > | ^~~~~
> >
> > Cc: Hannes Reinecke <[email protected]>
> > Cc: "Daniel M. Eischen" <[email protected]>
> > Cc: Doug Ledford <[email protected]>
>
> FWIW, I can't seem to figure out how you got mine or Dan's email
> addresses as related to this driver. The MAINTAINERS file only lists
> Hannes. The driver Dan and I worked on was a different driver. It was
> named aic7xxx, but that was back in the 1990s. It was renamed to
> aic7xxx_old so that Adaptec could contribute this driver you are
> currently patching back around 2001 or so. And then maybe around 2010
> or something like that, the aic7xxx_old driver that Dan and I worked on
> was removed from the upstream source tree entirely. So, just out of
> curiosity, how did you get mine and Dan's email addresses to put on the
> Cc: list for these patches?

$ ./scripts/get_maintainer.pl --file-emails --git-min-percent 75 -f drivers/scsi/aic7xxx/aic7xxx_osm.c
Hannes Reinecke <[email protected]> (maintainer:AIC7XXX / AIC79XX SCSI DRIVER,in file)
"James E.J. Bottomley" <[email protected]> (maintainer:SCSI SUBSYSTEM)
"Martin K. Petersen" <[email protected]> (maintainer:SCSI SUBSYSTEM)
"Daniel M. Eischen" <[email protected]> (in file)
Doug Ledford <[email protected]> (in file)
[email protected] (open list:AIC7XXX / AIC79XX SCSI DRIVER)
[email protected] (open list)

Looks like get_maintainer.pl pulled it from the file header.

> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/scsi/aic7xxx/aic7xxx_osm.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> > b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> > index 2edfa0594f183..32bfe20d79cc1 100644
> > --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> > +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> > @@ -564,8 +564,6 @@ ahc_linux_target_alloc(struct scsi_target
> > *starget)
> > struct scsi_target **ahc_targp =
> > ahc_linux_target_in_softc(starget);
> > unsigned short scsirate;
> > struct ahc_devinfo devinfo;
> > - struct ahc_initiator_tinfo *tinfo;
> > - struct ahc_tmode_tstate *tstate;
> > char channel = starget->channel + 'A';
> > unsigned int our_id = ahc->our_id;
> > unsigned int target_offset;
> > @@ -612,9 +610,6 @@ ahc_linux_target_alloc(struct scsi_target
> > *starget)
> > spi_max_offset(starget) = 0;
> > spi_min_period(starget) =
> > ahc_find_period(ahc, scsirate, maxsync);
> > -
> > - tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
> > - starget->id, &tstate);
> > }
> > ahc_compile_devinfo(&devinfo, our_id, starget->id,
> > CAM_LUN_WILDCARD, channel,
>



--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog