X86 platform drivers
 help / color / mirror / Atom feed
* [patch 1/2] thinkpad_acpi: signedness bugs getting current_mode
@ 2015-03-11  9:34 Dan Carpenter
  2015-03-11 10:07 ` Bastien Nocera
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Dan Carpenter @ 2015-03-11  9:34 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh, Bastien Nocera
  Cc: Darren Hart, ibm-acpi-devel, platform-driver-x86, kernel-janitors

This needs to be signed for the error handling to work.  Valid modes are
small positive integers.

Fixes: b790ceeb0fd9 ('thinkpad_acpi: Add adaptive_kbd_mode sysfs attr')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 56eaddc..024861d 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2938,7 +2938,7 @@ static ssize_t adaptive_kbd_mode_show(struct device *dev,
 			   struct device_attribute *attr,
 			   char *buf)
 {
-	u32 current_mode;
+	int current_mode;
 
 	current_mode = adaptive_keyboard_get_mode();
 	if (current_mode < 0)
@@ -3621,7 +3621,7 @@ static int adaptive_keyboard_get_next_mode(int mode)
 
 static bool adaptive_keyboard_hotkey_notify_hotkey(unsigned int scancode)
 {
-	u32 current_mode = 0;
+	int current_mode = 0;
 	int new_mode = 0;
 	int keycode;
 

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

end of thread, other threads:[~2015-03-22 18:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11  9:34 [patch 1/2] thinkpad_acpi: signedness bugs getting current_mode Dan Carpenter
2015-03-11 10:07 ` Bastien Nocera
2015-03-11 10:28 ` Henrique de Moraes Holschuh
2015-03-14 19:03 ` Darren Hart
2015-03-14 21:06 ` Darren Hart
2015-03-15  2:46   ` Stephen Rothwell
2015-03-15  2:48     ` Stephen Rothwell
2015-03-19  3:42       ` Darren Hart
2015-03-22 18:58 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh

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