latest commit on thinkpad_acpi.c 6c231bd5eb07 shows warning

Previous thread: [PATCH 0/2] x86: 2 Coding Style patches by Paolo Ciarrocchi on Sunday, February 24, 2008 - 5:19 pm. (1 message)

Next thread: Linux 2.6.25-rc3 by Linus Torvalds on Sunday, February 24, 2008 - 6:16 pm. (10 messages)
To: <linux-kernel@...>
Cc: <hmh@...>, <len.brown@...>
Date: Sunday, February 24, 2008 - 6:07 pm

Hi

Commit 6c231bd5eb07ce546517019f334652b9ecfc329a
generate this warning:

drivers/misc/thinkpad_acpi.c: In function 'tpacpi_input_send_tabletsw':
include/linux/input.h:1290: warning: 'state' is used uninitialized in
this function
drivers/misc/thinkpad_acpi.c:1191: note: 'state' was declared here
drivers/misc/thinkpad_acpi.c: In function 'hotkey_tablet_mode_show':
drivers/misc/thinkpad_acpi.c:1723: warning: 's' is used uninitialized
in this function

I assume typo here thinkpad_acpi.c:10724 hotkey_get_tablet_mode
where status should be maybe 's' and local 's' shouldn't be defined at
all - just guess?

Zdenek
--

To: Zdenek Kabelac <zdenek.kabelac@...>
Cc: <linux-kernel@...>, <len.brown@...>
Date: Monday, February 25, 2008 - 3:01 pm

I can't seem to get these warnings in Debian gcc 4.2.3-1. But the code is
broken alright. I will send in a fix in a short while, as it will take a
small while to make sure there is nothing else wrong before I send in the
fix. I have to figure out how the heck that got past the testing in the
first place, as well...

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--

To: Henrique de Moraes Holschuh <hmh@...>
Cc: <linux-kernel@...>, <len.brown@...>
Date: Monday, February 25, 2008 - 3:11 pm

Try gcc-4.3 (or gcc-snapshot) - makes much better/deeper code analysis.

Zdenek
--

To: Zdenek Kabelac <zdenek.kabelac@...>
Cc: <linux-kernel@...>, <len.brown@...>
Date: Monday, February 25, 2008 - 2:27 pm

Erk. Looks like I tested one branch and did a git-send-email on the other
or something equally pathetic. Sorry about that.

I will check the entire thing over line by line and send a fix.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--

Previous thread: [PATCH 0/2] x86: 2 Coding Style patches by Paolo Ciarrocchi on Sunday, February 24, 2008 - 5:19 pm. (1 message)

Next thread: Linux 2.6.25-rc3 by Linus Torvalds on Sunday, February 24, 2008 - 6:16 pm. (10 messages)