mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] char: pcmcia: remove set but not used variable 'tmp'
@ 2021-05-14  6:21 Yu Kuai
  2021-05-14  6:28 ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Yu Kuai @ 2021-05-14  6:21 UTC (permalink / raw)
  To: laforge, arnd, gregkh, akpm; +Cc: linux-kernel, yukuai3, yi.zhang

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/char/pcmcia/cm4000_cs.c:1053:16: warning: variable ‘tmp’
set but not used [-Wunused-but-set-variable]

It is never used and so can be removed.

Fixes: c1986ee9bea3 ("[PATCH] New Omnikey Cardman 4000 driver")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
 drivers/char/pcmcia/cm4000_cs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 89681f07bc78..9ec25735425d 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1050,7 +1050,6 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
 	struct cm4000_dev *dev = filp->private_data;
 	unsigned int iobase = dev->p_dev->resource[0]->start;
 	unsigned short s;
-	unsigned char tmp;
 	unsigned char infolen;
 	unsigned char sendT0;
 	unsigned short nsend;
@@ -1148,7 +1147,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
 	set_cardparameter(dev);
 
 	/* dummy read, reset flag procedure received */
-	tmp = inb(REG_FLAGS1(iobase));
+	inb(REG_FLAGS1(iobase));
 
 	dev->flags1 = 0x20	/* T_Active */
 	    | (sendT0)
-- 
2.25.4


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

end of thread, other threads:[~2021-05-15  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14  6:21 [PATCH] char: pcmcia: remove set but not used variable 'tmp' Yu Kuai
2021-05-14  6:28 ` Arnd Bergmann
2021-05-15  7:15   ` yukuai (C)
2021-05-15  9:05     ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®