drivers/platform/x86/eeepc-wmi.c: fix build warning
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
--- drivers/platform/x86/eeepc-wmi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/platform/x86/eeepc-wmi.c +1 -1
@@ -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
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 functiondrivers/platform/x86/eeepc-wmi.c:209: note: ‘new’ was declared hereSigned-off-by Daniel Mack <[email protected]>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@@ -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
Matthew Garrett
AppliedApplied, thanks.
Signature · 1 line
Matthew Garrett | [email protected]