linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI/fan: Initialize acpi_state variable
@ 2013-07-01 14:21 naresh.bhat
  0 siblings, 0 replies; 10+ messages in thread
From: naresh.bhat @ 2013-07-01 14:21 UTC (permalink / raw)
  To: linux-acpi; +Cc: len.brown, patches, linaro-kernel, naresh.bhat, linux-kernel

From: Naresh Bhat <naresh.bhat@linaro.org>

 CC      drivers/acpi/fan.o
drivers/acpi/fan.c: In function ‘fan_get_cur_state’:
drivers/acpi/fan.c:96:9: warning: ‘acpi_state’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 drivers/acpi/fan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 8d1c010..5b02a0a 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -84,7 +84,7 @@ static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long
 {
 	struct acpi_device *device = cdev->devdata;
 	int result;
-	int acpi_state;
+	int acpi_state = ACPI_STATE_D0;
 
 	if (!device)
 		return -EINVAL;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] ACPI/fan: Initialize acpi_state variable
@ 2013-06-27 19:47 naresh.bhat
  2013-07-01 12:01 ` Naresh Bhat
  0 siblings, 1 reply; 10+ messages in thread
From: naresh.bhat @ 2013-06-27 19:47 UTC (permalink / raw)
  To: linux-acpi
  Cc: len.brown, patches, linaro-kernel, naresh.bhat, linux-kernel, rjw

From: Naresh Bhat <naresh.bhat@linaro.org>

  CC      drivers/acpi/fan.o
drivers/acpi/fan.c: In function ‘fan_get_cur_state’:
drivers/acpi/fan.c:96:9: warning: ‘acpi_state’ may be used uninitialized in this function [-Wuninitialized]
---
 drivers/acpi/fan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index f815da8..f961435 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -84,7 +84,7 @@ static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long
 {
 	struct acpi_device *device = cdev->devdata;
 	int result;
-	int acpi_state;
+	int acpi_state = ACPI_STATE_D0;
 
 	if (!device)
 		return -EINVAL;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] ACPI/fan: Initialize acpi_state variable
@ 2013-06-27 11:08 naresh.bhat
  2013-06-27 12:28 ` Rafael J. Wysocki
  0 siblings, 1 reply; 10+ messages in thread
From: naresh.bhat @ 2013-06-27 11:08 UTC (permalink / raw)
  To: linux-acpi; +Cc: len.brown, patches, linaro-kernel, naresh.bhat, linux-kernel

From: Naresh Bhat <naresh.bhat@linaro.org>

  CC      drivers/acpi/fan.o
drivers/acpi/fan.c: In function ‘fan_get_cur_state’:
drivers/acpi/fan.c:96:9: warning: ‘acpi_state’ may be used uninitialized in this function [-Wuninitialized]
---
 drivers/acpi/fan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index f815da8..f61f7fd 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -84,7 +84,7 @@ static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long
 {
 	struct acpi_device *device = cdev->devdata;
 	int result;
-	int acpi_state;
+	int acpi_state = 0;
 
 	if (!device)
 		return -EINVAL;
-- 
1.7.9.5


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

end of thread, other threads:[~2013-07-01 14:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-01 14:21 [PATCH] ACPI/fan: Initialize acpi_state variable naresh.bhat
  -- strict thread matches above, loose matches on Subject: below --
2013-06-27 19:47 naresh.bhat
2013-07-01 12:01 ` Naresh Bhat
2013-07-01 13:59   ` Rafael J. Wysocki
2013-07-01 14:25     ` Naresh Bhat
2013-06-27 11:08 naresh.bhat
2013-06-27 12:28 ` Rafael J. Wysocki
2013-06-27 13:07   ` Naresh Bhat
2013-06-27 19:29     ` Rafael J. Wysocki
2013-06-27 19:49       ` Naresh Bhat

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).