All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: apbps2 - remove useless variable
@ 2021-04-09  9:00 Jiapeng Chong
  2021-04-10  6:28 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-04-09  9:00 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Jiapeng Chong

Fix the following gcc warning:

drivers/input/serio/apbps2.c:106:16: warning: variable ‘tmp’ set but not
used [-Wunused-but-set-variable].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/input/serio/apbps2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index 594ac4e..974d7bf 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -103,7 +103,6 @@ static int apbps2_open(struct serio *io)
 {
 	struct apbps2_priv *priv = io->port_data;
 	int limit;
-	unsigned long tmp;
 
 	/* clear error flags */
 	iowrite32be(0, &priv->regs->status);
@@ -111,7 +110,7 @@ static int apbps2_open(struct serio *io)
 	/* Clear old data if available (unlikely) */
 	limit = 1024;
 	while ((ioread32be(&priv->regs->status) & APBPS2_STATUS_DR) && --limit)
-		tmp = ioread32be(&priv->regs->data);
+		ioread32be(&priv->regs->data);
 
 	/* Enable reciever and it's interrupt */
 	iowrite32be(APBPS2_CTRL_RE | APBPS2_CTRL_RI, &priv->regs->ctrl);
-- 
1.8.3.1


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

* Re: [PATCH] Input: apbps2 - remove useless variable
  2021-04-09  9:00 [PATCH] Input: apbps2 - remove useless variable Jiapeng Chong
@ 2021-04-10  6:28 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2021-04-10  6:28 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: linux-input, linux-kernel

On Fri, Apr 09, 2021 at 05:00:59PM +0800, Jiapeng Chong wrote:
> Fix the following gcc warning:
> 
> drivers/input/serio/apbps2.c:106:16: warning: variable ‘tmp’ set but not
> used [-Wunused-but-set-variable].
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Applied, thank you.

-- 
Dmitry

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

end of thread, other threads:[~2021-04-10  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09  9:00 [PATCH] Input: apbps2 - remove useless variable Jiapeng Chong
2021-04-10  6:28 ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.