lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20090715021934.4169.26505.sendpatchset@subratamodak.linux.ibm.com>
Date:	Wed, 15 Jul 2009 07:49:37 +0530
From:	Subrata Modak <subrata@...ux.vnet.ibm.com>
To:	Richard Purdie <rpurdie@...ys.net>, Raphael Assenat <raph@...com>
Cc:	Sachin P Sant <sachinp@...ux.vnet.ibm.com>,
	gregkh <gregkh@...e.de>, David Howells <dhowells@...hat.com>,
	Subrata Modak <subrata@...ux.vnet.ibm.com>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 03/06] Fix compilation warning for drivers/leds/leds_gpio.c

gcc 4.4.1 generates the following build warning on i386:

drivers/leds/leds-gpio.c:75: warning: ‘create_gpio_led’ defined but not used
drivers/leds/leds-gpio.c:126: warning: ‘delete_gpio_led’ defined but not used
drivers/leds/leds-gpio.c: In function ‘gpio_led_init’:
drivers/leds/leds-gpio.c:316: warning: ‘ret’ is used uninitialized in this function

Fix them as below:
Put the definitions of create_gpio_led() and delete_gpio_led()
inside
	#ifdef CONFIG_LEDS_GPIO_PLATFORM
when you actually call them inside
	#ifdef CONFIG_LEDS_GPIO_PLATFORM

And the remaining fix is inspired by David Howells fix few days back:
http://lkml.org/lkml/2009/7/9/109,

Signed-off-by: Subrata Modak<subrata@...ux.vnet.ibm.com>,
---

--- a/drivers/leds/leds-gpio.c	2009-06-29 19:20:42.000000000 +0530
+++ b/drivers/leds/leds-gpio.c	2009-07-15 05:51:21.000000000 +0530
@@ -29,6 +29,7 @@ struct gpio_led_data {
 			unsigned long *delay_on, unsigned long *delay_off);
 };
 
+#ifdef CONFIG_LEDS_GPIO_PLATFORM
 static void gpio_led_work(struct work_struct *work)
 {
 	struct gpio_led_data	*led_dat =
@@ -132,7 +133,6 @@ static void delete_gpio_led(struct gpio_
 	gpio_free(led->gpio);
 }
 
-#ifdef CONFIG_LEDS_GPIO_PLATFORM
 static int __devinit gpio_led_probe(struct platform_device *pdev)
 {
 	struct gpio_led_platform_data *pdata = pdev->dev.platform_data;
@@ -298,7 +298,7 @@ static struct of_platform_driver of_gpio
 
 static int __init gpio_led_init(void)
 {
-	int ret;
+	int uninitialized_var(ret);
 
 #ifdef CONFIG_LEDS_GPIO_PLATFORM	
 	ret = platform_driver_register(&gpio_led_driver);

---
Regards--
Subrata

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ