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

scsi: ips: Remove some set but unused variables

Intentionally keeping all register reads/writes.

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

 drivers/scsi/ips.c: In function ‘ips_init_copperhead’:
 drivers/scsi/ips.c:4700:10: warning: variable ‘ConfigByte’ set but not used [-Wunused-but-set-variable]
 4700 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES];
 | ^~~~~~~~~~
 drivers/scsi/ips.c: In function ‘ips_init_copperhead_memio’:
 drivers/scsi/ips.c:4794:10: warning: variable ‘ConfigByte’ set but not used [-Wunused-but-set-variable]
 4794 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES];
 | ^~~~~~~~~~
 drivers/scsi/ips.c: In function ‘ips_init_phase1’:
 drivers/scsi/ips.c:6839:10: warning: variable ‘func’ set but not used [-Wunused-but-set-variable]
 6839 | uint8_t func;
 | ^~~~
 drivers/scsi/ips.c:6838:10: warning: variable ‘bus’ set but not used [-Wunused-but-set-variable]
 6838 | uint8_t bus;
 | ^~~

Link: https://lore.kernel.org/r/20200723122446.1329773-13-lee.jones@linaro.org
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: ipslinux@adaptec.com
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e4020e08
......@@ -4697,7 +4697,6 @@ ips_init_copperhead(ips_ha_t * ha)
uint8_t Isr;
uint8_t Cbsp;
uint8_t PostByte[IPS_MAX_POST_BYTES];
uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES];
int i, j;
METHOD_TRACE("ips_init_copperhead", 1);
......@@ -4742,7 +4741,7 @@ ips_init_copperhead(ips_ha_t * ha)
/* error occurred */
return (0);
ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR);
inb(ha->io_addr + IPS_REG_ISPR);
outb(Isr, ha->io_addr + IPS_REG_HISR);
}
......@@ -4791,7 +4790,6 @@ ips_init_copperhead_memio(ips_ha_t * ha)
uint8_t Isr = 0;
uint8_t Cbsp;
uint8_t PostByte[IPS_MAX_POST_BYTES];
uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES];
int i, j;
METHOD_TRACE("ips_init_copperhead_memio", 1);
......@@ -4836,7 +4834,7 @@ ips_init_copperhead_memio(ips_ha_t * ha)
/* error occurred */
return (0);
ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR);
readb(ha->mem_ptr + IPS_REG_ISPR);
writeb(Isr, ha->mem_ptr + IPS_REG_HISR);
}
......@@ -6835,8 +6833,6 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
uint32_t mem_addr;
uint32_t io_len;
uint32_t mem_len;
uint8_t bus;
uint8_t func;
int j;
int index;
dma_addr_t dma_address;
......@@ -6856,10 +6852,6 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
if (index >= IPS_MAX_ADAPTERS)
return -1;
/* stuff that we get in dev */
bus = pci_dev->bus->number;
func = pci_dev->devfn;
/* Init MEM/IO addresses to 0 */
mem_addr = 0;
io_addr = 0;
......
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