diff mbox series

[-next] scsi: arcmsr: Remove set but not used variables 'id, lun'

Message ID 1539340583-117444-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State Accepted
Headers show
Series [-next] scsi: arcmsr: Remove set but not used variables 'id, lun' | expand

Commit Message

Yue Haibing Oct. 12, 2018, 10:36 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_drain_donequeue':
drivers/scsi/arcmsr/arcmsr_hba.c:1320:10: warning:
 variable 'lun' set but not used [-Wunused-but-set-variable]

drivers/scsi/arcmsr/arcmsr_hba.c:1320:6: warning:
 variable 'id' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit ae52e7f09ff5

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/arcmsr/arcmsr_hba.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Martin K. Petersen Oct. 16, 2018, 10:15 p.m. UTC | #1
YueHaibing,

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_drain_donequeue':
> drivers/scsi/arcmsr/arcmsr_hba.c:1320:10: warning:
>  variable 'lun' set but not used [-Wunused-but-set-variable]
>
> drivers/scsi/arcmsr/arcmsr_hba.c:1320:6: warning:
>  variable 'id' set but not used [-Wunused-but-set-variable]

Applied to 4.20/scsi-queue, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index cc0be46..f53e1bc 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -1317,13 +1317,10 @@  static void arcmsr_report_ccb_state(struct AdapterControlBlock *acb,
 
 static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, struct CommandControlBlock *pCCB, bool error)
 {
-	int id, lun;
 	if ((pCCB->acb != acb) || (pCCB->startdone != ARCMSR_CCB_START)) {
 		if (pCCB->startdone == ARCMSR_CCB_ABORTED) {
 			struct scsi_cmnd *abortcmd = pCCB->pcmd;
 			if (abortcmd) {
-				id = abortcmd->device->id;
-				lun = abortcmd->device->lun;				
 				abortcmd->result |= DID_ABORT << 16;
 				arcmsr_ccb_complete(pCCB);
 				printk(KERN_NOTICE "arcmsr%d: pCCB ='0x%p' isr got aborted command \n",