Commit ea7fb534 authored by Lee Jones's avatar Lee Jones Committed by Martin K. Petersen

scsi: 3w-9xxx: Remove a few set but unused variables

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

 drivers/scsi/3w-9xxx.c: In function ‘twa_empty_response_queue’:
 drivers/scsi/3w-9xxx.c:942:24: warning: variable ‘response_que_value’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/3w-9xxx.c: In function ‘twa_scsi_biosparam’:
 drivers/scsi/3w-9xxx.c:1701:23: warning: variable ‘tw_dev’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/3w-9xxx.c: In function ‘twa_scsiop_execute_scsi’:
 drivers/scsi/3w-9xxx.c:1812:22: warning: variable ‘sglist’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20210312094738.2207817-30-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: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6c31cb74
...@@ -939,13 +939,13 @@ static int twa_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value) ...@@ -939,13 +939,13 @@ static int twa_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value)
/* This function will empty the response queue */ /* This function will empty the response queue */
static int twa_empty_response_queue(TW_Device_Extension *tw_dev) static int twa_empty_response_queue(TW_Device_Extension *tw_dev)
{ {
u32 status_reg_value, response_que_value; u32 status_reg_value;
int count = 0, retval = 1; int count = 0, retval = 1;
status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev)); status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
while (((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) && (count < TW_MAX_RESPONSE_DRAIN)) { while (((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) && (count < TW_MAX_RESPONSE_DRAIN)) {
response_que_value = readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev)); readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev));
status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev)); status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
count++; count++;
} }
...@@ -1698,9 +1698,6 @@ static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset) ...@@ -1698,9 +1698,6 @@ static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset)
static int twa_scsi_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]) static int twa_scsi_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[])
{ {
int heads, sectors, cylinders; int heads, sectors, cylinders;
TW_Device_Extension *tw_dev;
tw_dev = (TW_Device_Extension *)sdev->host->hostdata;
if (capacity >= 0x200000) { if (capacity >= 0x200000) {
heads = 255; heads = 255;
...@@ -1809,14 +1806,11 @@ static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, ...@@ -1809,14 +1806,11 @@ static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id,
u32 num_sectors = 0x0; u32 num_sectors = 0x0;
int i, sg_count; int i, sg_count;
struct scsi_cmnd *srb = NULL; struct scsi_cmnd *srb = NULL;
struct scatterlist *sglist = NULL, *sg; struct scatterlist *sg;
int retval = 1; int retval = 1;
if (tw_dev->srb[request_id]) { if (tw_dev->srb[request_id])
srb = tw_dev->srb[request_id]; srb = tw_dev->srb[request_id];
if (scsi_sglist(srb))
sglist = scsi_sglist(srb);
}
/* Initialize command packet */ /* Initialize command packet */
full_command_packet = tw_dev->command_packet_virt[request_id]; full_command_packet = tw_dev->command_packet_virt[request_id];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment