diff mbox series

[v2,14/29] scsi: arcmsr: arcmsr_hba: Remove some set but unused variables

Message ID 20200713074645.126138-15-lee.jones@linaro.org
State New
Headers show
Series Fix a bunch more SCSI related W=1 warnings | expand

Commit Message

Lee Jones July 13, 2020, 7:46 a.m. UTC
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;
 | ^~~~~~~~~~~~~~

Cc: support@areca.com.tw
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/scsi/arcmsr/arcmsr_hba.c | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

-- 
2.25.1
diff mbox series

Patch

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 30914c8f29cc2..1c252934409c7 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -283,11 +283,10 @@  static bool arcmsr_remap_pciregion(struct AdapterControlBlock *acb)
 	}
 	case ACB_ADAPTER_TYPE_D: {
 		void __iomem *mem_base0;
-		unsigned long addr, range, flags;
+		unsigned long addr, range;
 
 		addr = (unsigned long)pci_resource_start(pdev, 0);
 		range = pci_resource_len(pdev, 0);
-		flags = pci_resource_flags(pdev, 0);
 		mem_base0 = ioremap(addr, range);
 		if (!mem_base0) {
 			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)
 {
-	uint32_t intmask_org;
 	struct Scsi_Host *host = pci_get_drvdata(pdev);
 	struct AdapterControlBlock *acb =
 		(struct AdapterControlBlock *)host->hostdata;
 
-	intmask_org = arcmsr_disable_outbound_ints(acb);
+	arcmsr_disable_outbound_ints(acb);
 	arcmsr_free_irq(pdev, acb);
 	del_timer_sync(&acb->eternal_timer);
 	if (set_date_time)
@@ -1407,7 +1405,7 @@  static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
 	struct ARCMSR_CDB *pARCMSR_CDB;
 	bool error;
 	struct CommandControlBlock *pCCB;
-	unsigned long ccb_cdb_phy, cdb_phy_hipart;
+	unsigned long ccb_cdb_phy;
 
 	switch (acb->adapter_type) {
 
@@ -1489,8 +1487,7 @@  static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
 					((toggle ^ 0x4000) + 1);
 				doneq_index = pmu->doneq_index;
 				spin_unlock_irqrestore(&acb->doneq_lock, flags);
-				cdb_phy_hipart = pmu->done_qbuffer[doneq_index &
-					0xFFF].addressHigh;
+				pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
 				addressLow = pmu->done_qbuffer[doneq_index &
 					0xFFF].addressLow;
 				ccb_cdb_phy = (addressLow & 0xFFFFFFF0);
@@ -2445,7 +2442,7 @@  static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb)
 	struct MessageUnit_D  *pmu;
 	struct ARCMSR_CDB *arcmsr_cdb;
 	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);
 	pmu = acb->pmuD;
@@ -2459,8 +2456,7 @@  static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb)
 			pmu->doneq_index = index_stripped ? (index_stripped | toggle) :
 				((toggle ^ 0x4000) + 1);
 			doneq_index = pmu->doneq_index;
-			cdb_phy_hipart = pmu->done_qbuffer[doneq_index &
-				0xFFF].addressHigh;
+			pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
 			addressLow = pmu->done_qbuffer[doneq_index &
 				0xFFF].addressLow;
 			ccb_cdb_phy = (addressLow & 0xFFFFFFF0);
@@ -3495,7 +3491,7 @@  static int arcmsr_hbaD_polling_ccbdone(struct AdapterControlBlock *acb,
 	bool error;
 	uint32_t poll_ccb_done = 0, poll_count = 0, flag_ccb;
 	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 CommandControlBlock *pCCB;
 	struct MessageUnit_D *pmu = acb->pmuD;
@@ -3527,8 +3523,7 @@  static int arcmsr_hbaD_polling_ccbdone(struct AdapterControlBlock *acb,
 				((toggle ^ 0x4000) + 1);
 		doneq_index = pmu->doneq_index;
 		spin_unlock_irqrestore(&acb->doneq_lock, flags);
-		cdb_phy_hipart = pmu->done_qbuffer[doneq_index &
-				0xFFF].addressHigh;
+		pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
 		flag_ccb = pmu->done_qbuffer[doneq_index & 0xFFF].addressLow;
 		ccb_cdb_phy = (flag_ccb & 0xFFFFFFF0);
 		if (acb->cdb_phyadd_hipart)