Skip to contentSkip to conversation

drivers/platform/x86/eeepc-wmi.c: fix build warning

PATCH Applied Daniel Mack 3 participants 3 messages May 19, 2010 – May 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/platform/x86/eeepc-wmi.c: fix build warning

drivers/platform/x86/eeepc-wmi.c: In function ‘eeepc_wmi_notify’:
drivers/platform/x86/eeepc-wmi.c:209: warning: ‘new’ may be used uninitialized in this function drivers/platform/x86/eeepc-wmi.c:209: note: ‘new’ was declared here

Cc Matthew Garrett <[email protected]>
Cc Yong Wang <[email protected]>
Cc Corentin Chary <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Tejun Heo <[email protected]>
---
 drivers/platform/x86/eeepc-wmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/platform/x86/eeepc-wmi.c +1 -1
index b227eb4..9dc50fb 100644
@@ -206,7 +206,7 @@ static int eeepc_wmi_backlight_notify(struct eeepc_wmi *eeepc, int code)
 {
 	struct backlight_device *bd = eeepc->backlight_device;
 	int old = bd->props.brightness;
-	int new;
+	int new = old;
 
 	if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX)
 		new = code - NOTIFY_BRNUP_MIN + 1;
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 31 lines · Daniel Mack

drivers/platform/x86/eeepc-wmi.c: In function ‘eeepc_wmi_notify’:
drivers/platform/x86/eeepc-wmi.c:209: warning: ‘new’ may be used uninitialized in this function drivers/platform/x86/eeepc-wmi.c:209: note: ‘new’ was declared here

Cc Matthew Garrett <[email protected]>
Cc Yong Wang <[email protected]>
Cc Corentin Chary <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Tejun Heo <[email protected]>

---
 drivers/platform/x86/eeepc-wmi.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/platform/x86/eeepc-wmi.c +1 -2
index b227eb4..9dc50fb 100644
@@ -206,7 +206,7 @@ static int eeepc_wmi_backlight_notify(struct eeepc_wmi *eeepc, int code)
  {
        struct backlight_device *bd = eeepc->backlight_device;
        int old = bd->props.brightness;
-       int new;
+       int new = old;
 
        if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX)
                new = code - NOTIFY_BRNUP_MIN + 1;
--

1.7.1

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 6 lines
Corentin Chary
http://xf.iksaif.net
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html