linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] keyboard: remove set but not used variables 'sts'
@ 2019-07-16  8:54 Mao Wenan
  2019-07-16 18:17 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Mao Wenan @ 2019-07-16  8:54 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, linux-kernel, kernel-janitors, Mao Wenan

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

drivers/input/keyboard/applespi.c: In function applespi_set_bl_level:
drivers/input/keyboard/applespi.c:902:6: warning: variable sts set but not used [-Wunused-but-set-variable]

Fixes: b426ac0452093d ("Input: add Apple SPI keyboard and trackpad driver")

Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
 drivers/input/keyboard/applespi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c
index c1a6843..548737e 100644
--- a/drivers/input/keyboard/applespi.c
+++ b/drivers/input/keyboard/applespi.c
@@ -899,7 +899,6 @@ static void applespi_set_bl_level(struct led_classdev *led_cdev,
 	struct applespi_data *applespi =
 		container_of(led_cdev, struct applespi_data, backlight_info);
 	unsigned long flags;
-	int sts;
 
 	spin_lock_irqsave(&applespi->cmd_msg_lock, flags);
 
@@ -916,7 +915,7 @@ static void applespi_set_bl_level(struct led_classdev *led_cdev,
 			 KBD_BL_LEVEL_MIN);
 	}
 
-	sts = applespi_send_cmd_msg(applespi);
+	applespi_send_cmd_msg(applespi);
 
 	spin_unlock_irqrestore(&applespi->cmd_msg_lock, flags);
 }
-- 
2.7.4

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

end of thread, other threads:[~2019-07-16 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-16  8:54 [PATCH -next] keyboard: remove set but not used variables 'sts' Mao Wenan
2019-07-16 18:17 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).