linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/platform/x86/eeepc-wmi.c: fix build warning
@ 2010-05-19 10:37 Daniel Mack
  2010-05-19 12:06 ` Corentin Chary
  2010-05-20 13:43 ` Matthew Garrett
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Mack @ 2010-05-19 10:37 UTC (permalink / raw)
  To: linux-kernel
  Cc: Daniel Mack, Matthew Garrett, Yong Wang, Corentin Chary,
	Dmitry Torokhov, Tejun Heo, platform-driver-x86

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

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Yong Wang <yong.y.wang@intel.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Tejun Heo <tj@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
---
 drivers/platform/x86/eeepc-wmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index b227eb4..9dc50fb 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -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


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

* Re: [PATCH] drivers/platform/x86/eeepc-wmi.c: fix build warning
  2010-05-19 10:37 [PATCH] drivers/platform/x86/eeepc-wmi.c: fix build warning Daniel Mack
@ 2010-05-19 12:06 ` Corentin Chary
  2010-05-20 13:43 ` Matthew Garrett
  1 sibling, 0 replies; 3+ messages in thread
From: Corentin Chary @ 2010-05-19 12:06 UTC (permalink / raw)
  To: Daniel Mack
  Cc: linux-kernel, Matthew Garrett, Yong Wang, Dmitry Torokhov,
	Tejun Heo, platform-driver-x86

On Wed, May 19, 2010 at 12:37 PM, Daniel Mack <daniel@caiaq.de> wrote:
> 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
>
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> Cc: Matthew Garrett <mjg@redhat.com>
> Cc: Yong Wang <yong.y.wang@intel.com>
> Cc: Corentin Chary <corentincj@iksaif.net>
> Cc: Dmitry Torokhov <dtor@mail.ru>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: platform-driver-x86@vger.kernel.org
> ---
>  drivers/platform/x86/eeepc-wmi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
> index b227eb4..9dc50fb 100644
> --- a/drivers/platform/x86/eeepc-wmi.c
> +++ b/drivers/platform/x86/eeepc-wmi.c
> @@ -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
>
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Acked-By: Corentin Chary <corentincj@iksaif.net>

-- 
Corentin Chary
http://xf.iksaif.net

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

* Re: [PATCH] drivers/platform/x86/eeepc-wmi.c: fix build warning
  2010-05-19 10:37 [PATCH] drivers/platform/x86/eeepc-wmi.c: fix build warning Daniel Mack
  2010-05-19 12:06 ` Corentin Chary
@ 2010-05-20 13:43 ` Matthew Garrett
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Garrett @ 2010-05-20 13:43 UTC (permalink / raw)
  To: Daniel Mack
  Cc: linux-kernel, Yong Wang, Corentin Chary, Dmitry Torokhov,
	Tejun Heo, platform-driver-x86

Applied, thanks.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

end of thread, other threads:[~2010-05-20 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 10:37 [PATCH] drivers/platform/x86/eeepc-wmi.c: fix build warning Daniel Mack
2010-05-19 12:06 ` Corentin Chary
2010-05-20 13:43 ` Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).