Skip to content

Commit

Permalink
Input: adi - remove redundant variable z
Browse files Browse the repository at this point in the history
Variable z is being assigned a value that is never read, the
variable is redundant and can be removed.

Cleans up clang scan build warning:
drivers/input/joystick/adi.c:139:6: warning: Although the
value stored to 'z' is used in the enclosing expression,
the value is never actually read from 'z' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220318002318.80519-1-colin.i.king@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Colin Ian King authored and Dmitry Torokhov committed Mar 21, 2022
1 parent a23ba3c commit a949087
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/joystick/adi.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static void adi_read_packet(struct adi_port *port)
{
struct adi *adi = port->adi;
struct gameport *gameport = port->gameport;
unsigned char u, v, w, x, z;
unsigned char u, v, w, x;
int t[2], s[2], i;
unsigned long flags;

Expand All @@ -136,7 +136,7 @@ static void adi_read_packet(struct adi_port *port)
local_irq_save(flags);

gameport_trigger(gameport);
v = z = gameport_read(gameport);
v = gameport_read(gameport);

do {
u = v;
Expand Down

0 comments on commit a949087

Please sign in to comment.