diff mbox series

[-next] scsi: cxlflash: remove set but not used variable 'ioarcb'

Message ID 20191021141957.18828-1-yuehaibing@huawei.com (mailing list archive)
State Mainlined
Commit e519a34c29597110e92908294be8464e91cabf9c
Headers show
Series [-next] scsi: cxlflash: remove set but not used variable 'ioarcb' | expand

Commit Message

Yue Haibing Oct. 21, 2019, 2:19 p.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/cxlflash/main.c:47:22: warning:
 variable ioarcb set but not used [-Wunused-but-set-variable]

It is never used, so can be removed.

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

Comments

Matthew R. Ochs Oct. 22, 2019, 9:11 p.m. UTC | #1
On Mon, Oct 21, 2019 at 10:19:57PM +0800, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/scsi/cxlflash/main.c:47:22: warning:
>  variable ioarcb set but not used [-Wunused-but-set-variable]
> 
> It is never used, so can be removed.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Matthew R. Ochs <mrochs@linux.ibm.com>
Martin K. Petersen Oct. 23, 2019, 2:40 a.m. UTC | #2
YueHaibing,

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/cxlflash/main.c:47:22: warning:
>  variable ioarcb set but not used [-Wunused-but-set-variable]

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

Patch

diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index 2dbf35f..fbd2ae4 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -44,14 +44,12 @@  static void process_cmd_err(struct afu_cmd *cmd, struct scsi_cmnd *scp)
 	struct afu *afu = cmd->parent;
 	struct cxlflash_cfg *cfg = afu->parent;
 	struct device *dev = &cfg->dev->dev;
-	struct sisl_ioarcb *ioarcb;
 	struct sisl_ioasa *ioasa;
 	u32 resid;
 
 	if (unlikely(!cmd))
 		return;
 
-	ioarcb = &(cmd->rcb);
 	ioasa = &(cmd->sa);
 
 	if (ioasa->rc.flags & SISL_RC_FLAGS_UNDERRUN) {