[PATCH 08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'

From: Lee Jones
Date: Tue Jul 07 2020 - 10:01:25 EST


There is no need to populate an unused variable, even if the read is required.

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

drivers/scsi/pcmcia/nsp_cs.c: In function ânsp_cs_messageâ:
drivers/scsi/pcmcia/nsp_cs.c:143:2: warning: function ânsp_cs_messageâ might be a candidate for âgnu_printfâ format attribute [-Wsuggest-attribute=format]
drivers/scsi/pcmcia/nsp_cs.c: In function ânsp_fifo_countâ:
drivers/scsi/pcmcia/nsp_cs.c:692:24: warning: variable âdummyâ set but not used [-Wunused-but-set-variable]

Cc: YOKOTA Hiroshi <yokota@xxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
drivers/scsi/pcmcia/nsp_cs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 57a78f84f97ab..8655ff1249bbc 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -690,14 +690,14 @@ static int nsp_fifo_count(struct scsi_cmnd *SCpnt)
{
unsigned int base = SCpnt->device->host->io_port;
unsigned int count;
- unsigned int l, m, h, dummy;
+ unsigned int l, m, h;

nsp_index_write(base, POINTERCLR, POINTER_CLEAR | ACK_COUNTER);

l = nsp_index_read(base, TRANSFERCOUNT);
m = nsp_index_read(base, TRANSFERCOUNT);
h = nsp_index_read(base, TRANSFERCOUNT);
- dummy = nsp_index_read(base, TRANSFERCOUNT); /* required this! */
+ nsp_index_read(base, TRANSFERCOUNT); /* required this! */

count = (h << 16) | (m << 8) | (l << 0);

--
2.25.1