The variable 'tmp' in sw_i2c_wait() is written but never read outside
the loop, triggering a set-but-not-used warning with W=1. The loop
itself is a fixed-count busy-wait with no side effects; remove the
unused variable and keep the empty loop body.
Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>
---
drivers/staging/sm750fb/ddk750_swi2c.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
index e63f3b00ec4c..55623ad35be2 100644
--- a/drivers/staging/sm750fb/ddk750_swi2c.c
+++ b/drivers/staging/sm750fb/ddk750_swi2c.c
@@ -92,12 +92,10 @@ static void sw_i2c_wait(void)
* it's more reliable than counter loop ..
* write 0x61 to 0x3ce and read from 0x3cf
*/
- int i, tmp;
+ int i;
- for (i = 0; i < 600; i++) {
- tmp = i;
- tmp += i;
- }
+ for (i = 0; i < 600; i++)
+ ;
}
/*
--
2.55.0