[tip:x86/urgent] x86: Work around compilation warning in arch/x86/kernel/apm_32.c

From: tip-bot for Subrata Modak
Date: Tue Aug 04 2009 - 11:33:43 EST


Commit-ID: dc731fbbadf5d65c98fcd6c86472aa286c16458a
Gitweb: http://git.kernel.org/tip/dc731fbbadf5d65c98fcd6c86472aa286c16458a
Author: Subrata Modak <subrata@xxxxxxxxxxxxxxxxxx>
AuthorDate: Tue, 21 Jul 2009 08:02:27 +0530
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Tue, 4 Aug 2009 16:34:23 +0200

x86: Work around compilation warning in arch/x86/kernel/apm_32.c

The following fix was initially inspired by David Howells fix
few days back:

http://lkml.org/lkml/2009/7/9/109

However, Ingo disapproves such fixes as it's dangerous (it can
hide future, relevant warnings) - in something as
performance-uncritical.

So, initialize 'err' to '0' to work around a GCC false positive
warning:

http://lkml.org/lkml/2009/7/18/89

Signed-off-by: Subrata Modak<subrata@xxxxxxxxxxxxxxxxxx>
Cc: Sachin P Sant <sachinp@xxxxxxxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx>
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
LKML-Reference: <20090721023226.31855.67236.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
arch/x86/kernel/apm_32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 79302e9..442b550 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -811,7 +811,7 @@ static int apm_do_idle(void)
u8 ret = 0;
int idled = 0;
int polling;
- int err;
+ int err = 0;

polling = !!(current_thread_info()->status & TS_POLLING);
if (polling) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/