linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] scsi: cxlflash: remove set but not used variable 'ioarcb'
@ 2019-10-21 14:19 YueHaibing
  2019-10-22 21:11 ` Matthew R. Ochs
  2019-10-23  2:40 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-10-21 14:19 UTC (permalink / raw)
  To: manoj, mrochs, ukrishn, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, 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]

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(-)

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) {
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] scsi: cxlflash: remove set but not used variable 'ioarcb'
  2019-10-21 14:19 [PATCH -next] scsi: cxlflash: remove set but not used variable 'ioarcb' YueHaibing
@ 2019-10-22 21:11 ` Matthew R. Ochs
  2019-10-23  2:40 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew R. Ochs @ 2019-10-22 21:11 UTC (permalink / raw)
  To: YueHaibing
  Cc: manoj, ukrishn, jejb, martin.petersen, linux-scsi, linux-kernel

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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] scsi: cxlflash: remove set but not used variable 'ioarcb'
  2019-10-21 14:19 [PATCH -next] scsi: cxlflash: remove set but not used variable 'ioarcb' YueHaibing
  2019-10-22 21:11 ` Matthew R. Ochs
@ 2019-10-23  2:40 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-10-23  2:40 UTC (permalink / raw)
  To: YueHaibing
  Cc: manoj, mrochs, ukrishn, jejb, martin.petersen, linux-scsi, linux-kernel


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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-23  2:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21 14:19 [PATCH -next] scsi: cxlflash: remove set but not used variable 'ioarcb' YueHaibing
2019-10-22 21:11 ` Matthew R. Ochs
2019-10-23  2:40 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).