Skip to content

Commit

Permalink
scsi: 3w-sas: Remove unused variables 'sglist' and 'tw_dev'
Browse files Browse the repository at this point in the history
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/3w-sas.c: In function ‘twl_scsiop_execute_scsi’:
 drivers/scsi/3w-sas.c:298:22: warning: variable ‘sglist’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/3w-sas.c: In function ‘twl_scsi_biosparam’:
 drivers/scsi/3w-sas.c:1411:23: warning: variable ‘tw_dev’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20210312094738.2207817-31-lee.jones@linaro.org
Cc: Adam Radford <aradford@gmail.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Lee Jones authored and Martin K. Petersen committed Mar 16, 2021
1 parent ea7fb53 commit 475bff6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/scsi/3w-sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,11 @@ static int twl_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id,
TW_Command_Apache *command_packet;
int i, sg_count;
struct scsi_cmnd *srb = NULL;
struct scatterlist *sglist = NULL, *sg;
struct scatterlist *sg;
int retval = 1;

if (tw_dev->srb[request_id]) {
if (tw_dev->srb[request_id])
srb = tw_dev->srb[request_id];
if (scsi_sglist(srb))
sglist = scsi_sglist(srb);
}

/* Initialize command packet */
full_command_packet = tw_dev->command_packet_virt[request_id];
Expand Down Expand Up @@ -1408,9 +1405,6 @@ static int twl_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_res
static int twl_scsi_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[])
{
int heads, sectors;
TW_Device_Extension *tw_dev;

tw_dev = (TW_Device_Extension *)sdev->host->hostdata;

if (capacity >= 0x200000) {
heads = 255;
Expand Down

0 comments on commit 475bff6

Please sign in to comment.