scsi: arcmsr: Remove some set but unused variables

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

 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_remap_pciregion’:
 drivers/scsi/arcmsr/arcmsr_hba.c:286:30: warning: variable ‘flags’ set but not used [-Wunused-but-set-variable]
 286 | unsigned long addr, range, flags;
 | ^~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_suspend’:
 drivers/scsi/arcmsr/arcmsr_hba.c:1070:11: warning: variable ‘intmask_org’ set but not used [-Wunused-but-set-variable]
 1070 | uint32_t intmask_org;
 | ^~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_done4abort_postqueue’:
 drivers/scsi/arcmsr/arcmsr_hba.c:1410:29: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 1410 | unsigned long ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_postqueue_isr’:
 drivers/scsi/arcmsr/arcmsr_hba.c:2448:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 2448 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_polling_ccbdone’:
 drivers/scsi/arcmsr/arcmsr_hba.c:3498:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 3498 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200713074645.126138-15-lee.jones@linaro.org
Cc: support@areca.com.tw
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Lee Jones 2020-07-13 08:46:30 +01:00 committed by Martin K. Petersen
parent 4db2ac3e03
commit 18bc435e0a

View File

@ -283,11 +283,10 @@ static bool arcmsr_remap_pciregion(struct AdapterControlBlock *acb)
} }
case ACB_ADAPTER_TYPE_D: { case ACB_ADAPTER_TYPE_D: {
void __iomem *mem_base0; void __iomem *mem_base0;
unsigned long addr, range, flags; unsigned long addr, range;
addr = (unsigned long)pci_resource_start(pdev, 0); addr = (unsigned long)pci_resource_start(pdev, 0);
range = pci_resource_len(pdev, 0); range = pci_resource_len(pdev, 0);
flags = pci_resource_flags(pdev, 0);
mem_base0 = ioremap(addr, range); mem_base0 = ioremap(addr, range);
if (!mem_base0) { if (!mem_base0) {
pr_notice("arcmsr%d: memory mapping region fail\n", pr_notice("arcmsr%d: memory mapping region fail\n",
@ -1067,12 +1066,11 @@ static void arcmsr_free_irq(struct pci_dev *pdev,
static int arcmsr_suspend(struct pci_dev *pdev, pm_message_t state) static int arcmsr_suspend(struct pci_dev *pdev, pm_message_t state)
{ {
uint32_t intmask_org;
struct Scsi_Host *host = pci_get_drvdata(pdev); struct Scsi_Host *host = pci_get_drvdata(pdev);
struct AdapterControlBlock *acb = struct AdapterControlBlock *acb =
(struct AdapterControlBlock *)host->hostdata; (struct AdapterControlBlock *)host->hostdata;
intmask_org = arcmsr_disable_outbound_ints(acb); arcmsr_disable_outbound_ints(acb);
arcmsr_free_irq(pdev, acb); arcmsr_free_irq(pdev, acb);
del_timer_sync(&acb->eternal_timer); del_timer_sync(&acb->eternal_timer);
if (set_date_time) if (set_date_time)
@ -1407,7 +1405,7 @@ static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
struct ARCMSR_CDB *pARCMSR_CDB; struct ARCMSR_CDB *pARCMSR_CDB;
bool error; bool error;
struct CommandControlBlock *pCCB; struct CommandControlBlock *pCCB;
unsigned long ccb_cdb_phy, cdb_phy_hipart; unsigned long ccb_cdb_phy;
switch (acb->adapter_type) { switch (acb->adapter_type) {
@ -1489,8 +1487,7 @@ static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
((toggle ^ 0x4000) + 1); ((toggle ^ 0x4000) + 1);
doneq_index = pmu->doneq_index; doneq_index = pmu->doneq_index;
spin_unlock_irqrestore(&acb->doneq_lock, flags); spin_unlock_irqrestore(&acb->doneq_lock, flags);
cdb_phy_hipart = pmu->done_qbuffer[doneq_index & pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
0xFFF].addressHigh;
addressLow = pmu->done_qbuffer[doneq_index & addressLow = pmu->done_qbuffer[doneq_index &
0xFFF].addressLow; 0xFFF].addressLow;
ccb_cdb_phy = (addressLow & 0xFFFFFFF0); ccb_cdb_phy = (addressLow & 0xFFFFFFF0);
@ -2445,7 +2442,7 @@ static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb)
struct MessageUnit_D *pmu; struct MessageUnit_D *pmu;
struct ARCMSR_CDB *arcmsr_cdb; struct ARCMSR_CDB *arcmsr_cdb;
struct CommandControlBlock *ccb; struct CommandControlBlock *ccb;
unsigned long flags, ccb_cdb_phy, cdb_phy_hipart; unsigned long flags, ccb_cdb_phy;
spin_lock_irqsave(&acb->doneq_lock, flags); spin_lock_irqsave(&acb->doneq_lock, flags);
pmu = acb->pmuD; pmu = acb->pmuD;
@ -2459,8 +2456,7 @@ static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb)
pmu->doneq_index = index_stripped ? (index_stripped | toggle) : pmu->doneq_index = index_stripped ? (index_stripped | toggle) :
((toggle ^ 0x4000) + 1); ((toggle ^ 0x4000) + 1);
doneq_index = pmu->doneq_index; doneq_index = pmu->doneq_index;
cdb_phy_hipart = pmu->done_qbuffer[doneq_index & pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
0xFFF].addressHigh;
addressLow = pmu->done_qbuffer[doneq_index & addressLow = pmu->done_qbuffer[doneq_index &
0xFFF].addressLow; 0xFFF].addressLow;
ccb_cdb_phy = (addressLow & 0xFFFFFFF0); ccb_cdb_phy = (addressLow & 0xFFFFFFF0);
@ -3495,7 +3491,7 @@ static int arcmsr_hbaD_polling_ccbdone(struct AdapterControlBlock *acb,
bool error; bool error;
uint32_t poll_ccb_done = 0, poll_count = 0, flag_ccb; uint32_t poll_ccb_done = 0, poll_count = 0, flag_ccb;
int rtn, doneq_index, index_stripped, outbound_write_pointer, toggle; int rtn, doneq_index, index_stripped, outbound_write_pointer, toggle;
unsigned long flags, ccb_cdb_phy, cdb_phy_hipart; unsigned long flags, ccb_cdb_phy;
struct ARCMSR_CDB *arcmsr_cdb; struct ARCMSR_CDB *arcmsr_cdb;
struct CommandControlBlock *pCCB; struct CommandControlBlock *pCCB;
struct MessageUnit_D *pmu = acb->pmuD; struct MessageUnit_D *pmu = acb->pmuD;
@ -3527,8 +3523,7 @@ polling_hbaD_ccb_retry:
((toggle ^ 0x4000) + 1); ((toggle ^ 0x4000) + 1);
doneq_index = pmu->doneq_index; doneq_index = pmu->doneq_index;
spin_unlock_irqrestore(&acb->doneq_lock, flags); spin_unlock_irqrestore(&acb->doneq_lock, flags);
cdb_phy_hipart = pmu->done_qbuffer[doneq_index & pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
0xFFF].addressHigh;
flag_ccb = pmu->done_qbuffer[doneq_index & 0xFFF].addressLow; flag_ccb = pmu->done_qbuffer[doneq_index & 0xFFF].addressLow;
ccb_cdb_phy = (flag_ccb & 0xFFFFFFF0); ccb_cdb_phy = (flag_ccb & 0xFFFFFFF0);
if (acb->cdb_phyadd_hipart) if (acb->cdb_phyadd_hipart)