linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/11] ARM: topology: mark init_cpu_topology as __init
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-08 17:53   ` Stephen Boyd
  2012-08-08 14:47 ` [PATCH 02/11] mfd/asic3: fix asic3_mfd_probe return value Arnd Bergmann
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Vincent Guittot, Namhyung Kim,
	Peter Zijlstra, Russell King

The init_cpu_topology function can be put into the __init section
and discarded after boot, because it is only called from
smp_prepare_cpus, which is also marked __init. This was reported
by gcc after Vincent Guittot added the parse_dt_topology function
in 339ca09d7ada "ARM: 7463/1: topology: Update cpu_power according to DT
information".

Without this patch, building kzm9g_defconfig results in:

WARNING: vmlinux.o(.text+0xb5a0): Section mismatch in reference from the function init_cpu_topology() to the function .init.text:parse_dt_topology()
The function init_cpu_topology() references
the function __init parse_dt_topology().
This is often because init_cpu_topology lacks a __init
annotation or the annotation of parse_dt_topology is wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/kernel/topology.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 198b084..26c12c6 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -321,7 +321,7 @@ void store_cpu_topology(unsigned int cpuid)
  * init_cpu_topology is called at boot when only one cpu is running
  * which prevent simultaneous write access to cpu_topology array
  */
-void init_cpu_topology(void)
+void __init init_cpu_topology(void)
 {
 	unsigned int cpu;
 
-- 
1.7.10


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

* [PATCH 02/11] mfd/asic3: fix asic3_mfd_probe return value
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
  2012-08-08 14:47 ` [PATCH 01/11] ARM: topology: mark init_cpu_topology as __init Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-08 14:47 ` [PATCH 03/11] usb/ohci-omap: remove unused variable Arnd Bergmann
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Paul Parsons, Philipp Zabel,
	Samuel Ortiz

In commit 4f304245b "mfd: Set asic3 DS1WM clock_rate", a possible
path through asic3_mfd_probe was introduced that would lead to
an unpredictable return value, if everything succeeds but there
are pdata->leds is NULL. This was reported correctly by gcc.

Without this patch, building magician_defconfig results in:

drivers/mfd/asic3.c: In function 'asic3_mfd_probe':
drivers/mfd/asic3.c:940:2: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
 drivers/mfd/asic3.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 383421b..683e18a 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -925,6 +925,7 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
 			goto out;
 	}
 
+	ret = 0;
 	if (pdata->leds) {
 		int i;
 
-- 
1.7.10


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

* [PATCH 03/11] usb/ohci-omap: remove unused variable
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
  2012-08-08 14:47 ` [PATCH 01/11] ARM: topology: mark init_cpu_topology as __init Arnd Bergmann
  2012-08-08 14:47 ` [PATCH 02/11] mfd/asic3: fix asic3_mfd_probe return value Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-08 15:25   ` Greg Kroah-Hartman
  2012-08-08 15:34   ` Alan Stern
  2012-08-08 14:47 ` [PATCH 04/11] ARM: ux500: really kill snowball_of_platform_devs Arnd Bergmann
                   ` (7 subsequent siblings)
  10 siblings, 2 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Richard Zhao, Alan Stern,
	Greg Kroah-Hartman

Commit c2e935a7d "USB: move transceiver from ehci_hcd and ohci_hcd to
hcd and rename it as phy" removed the last use of the "ohci" variable
in the usb_hcd_omap_remove function, but left the variable in place
unused.

Without this patch, building omap1_defconfig results in:

In file included from drivers/usb/host/ohci-hcd.c:1013:0:
drivers/usb/host/ohci-omap.c: In function 'usb_hcd_omap_remove':
drivers/usb/host/ohci-omap.c:406:19: warning: unused variable 'ohci' [-Wunused-variable]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Richard Zhao <richard.zhao@freescale.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/usb/host/ohci-omap.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index e7d75d2..f8b2d91 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -403,8 +403,6 @@ err0:
 static inline void
 usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
 {
-	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);
-
 	usb_remove_hcd(hcd);
 	if (!IS_ERR_OR_NULL(hcd->phy)) {
 		(void) otg_set_host(hcd->phy->otg, 0);
-- 
1.7.10


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

* [PATCH 04/11] ARM: ux500: really kill snowball_of_platform_devs
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
                   ` (2 preceding siblings ...)
  2012-08-08 14:47 ` [PATCH 03/11] usb/ohci-omap: remove unused variable Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-08 16:22   ` Lee Jones
  2012-08-08 14:47 ` [PATCH 05/11] ARM: exynos: exynos_pm_add_dev_to_genpd may be unused Arnd Bergmann
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Lee Jones, Linus Walleij

Commit fc67a597a "ARM: ux500: Remove temporary snowball_of_platform_devs
enablement structure" removed the only user of this variable, but did
not actually remove the array itself.

Without this patch, building u8500_defconfig results in:

arch/arm/mach-ux500/board-mop500.c:729:32: warning: 'snowball_of_platform_devs' defined but not used [-Wunused-variable]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 8674a89..2a732f7 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -726,11 +726,6 @@ MACHINE_END
 
 #ifdef CONFIG_MACH_UX500_DT
 
-static struct platform_device *snowball_of_platform_devs[] __initdata = {
-	&snowball_led_dev,
-	&snowball_key_dev,
-};
-
 struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 	/* Requires DMA and call-back bindings. */
 	OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
-- 
1.7.10


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

* [PATCH 05/11] ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
                   ` (3 preceding siblings ...)
  2012-08-08 14:47 ` [PATCH 04/11] ARM: ux500: really kill snowball_of_platform_devs Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-10  6:48   ` Kukjin Kim
  2012-08-10  6:57   ` Thomas Abraham
  2012-08-08 14:47 ` [PATCH 06/11] gpio: em: do not discard em_gio_irq_domain_cleanup Arnd Bergmann
                   ` (5 subsequent siblings)
  10 siblings, 2 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Thomas Abraham,
	Rafael J. Wysocki, Kukjin Kim

exynos_pm_add_dev_to_genpd is used if one or more out of a large
number of Kconfig symbols are enabled. However the new
exynos_defconfig selects none of those, so the function becomes
unused. Marking it so lets the compiler automatically discard
it.

Without this patch, building exynos_defconfig results in:

arch/arm/mach-exynos/pm_domains.c:118:123: warning: 'exynos_pm_add_dev_to_genpd' defined but not used [-Wunused-function]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-exynos/pm_domains.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 373c3c0..c0bc83a 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -115,7 +115,7 @@ static __init int exynos_pm_dt_parse_domains(void)
 }
 #endif /* CONFIG_OF */
 
-static __init void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
+static __init __maybe_unused void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
 						struct exynos_pm_domain *pd)
 {
 	if (pdev->dev.bus) {
-- 
1.7.10


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

* [PATCH 06/11] gpio: em: do not discard em_gio_irq_domain_cleanup
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
                   ` (4 preceding siblings ...)
  2012-08-08 14:47 ` [PATCH 05/11] ARM: exynos: exynos_pm_add_dev_to_genpd may be unused Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-10 10:59   ` Linus Walleij
  2012-08-08 14:47 ` [PATCH 07/11] net/stmmac: mark probe function as __devinit Arnd Bergmann
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Magnus Damm, Linus Walleij,
	Rafael J. Wysocki

The newly added gpio-em driver marks its em_gio_irq_domain_cleanup
function as __devexit, which would lead to that function being
discarded in case CONFIG_HOTPLUG is disabled. However, the function
is also called by the error handling logic em_gio_probe, which
would cause a jump into a NULL pointer if it was removed from the
kernel or module.

Without this patch, building kzm9d_defconfig results in:

WARNING: drivers/gpio/built-in.o(.devinit.text+0x330): Section mismatch in reference from the function em_gio_probe() to the function .devexit.text:em_gio_irq_domain_cleanup()
The function __devinit em_gio_probe() references
a function __devexit em_gio_irq_domain_cleanup().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
em_gio_irq_domain_cleanup() so it may be used outside an exit section.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Magnus Damm <damm@opensource.se>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/gpio/gpio-em.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index 150d976..ae37181 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -266,7 +266,7 @@ static int __devinit em_gio_irq_domain_init(struct em_gio_priv *p)
 	return 0;
 }
 
-static void __devexit em_gio_irq_domain_cleanup(struct em_gio_priv *p)
+static void em_gio_irq_domain_cleanup(struct em_gio_priv *p)
 {
 	struct gpio_em_config *pdata = p->pdev->dev.platform_data;
 
-- 
1.7.10


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

* [PATCH 07/11] net/stmmac: mark probe function as __devinit
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
                   ` (5 preceding siblings ...)
  2012-08-08 14:47 ` [PATCH 06/11] gpio: em: do not discard em_gio_irq_domain_cleanup Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-08 15:07   ` Stefan Roese
  2012-08-08 23:08   ` David Miller
  2012-08-08 14:47 ` [PATCH 08/11] mtd/omap2: fix dmaengine_slave_config error handling Arnd Bergmann
                   ` (3 subsequent siblings)
  10 siblings, 2 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Stefan Roese,
	Giuseppe Cavallaro, David S. Miller, netdev

Driver probe functions are generally __devinit so they will be
discarded after initialization for non-hotplug kernels.
This was found by a new warning after patch 6a228452d "stmmac: Add
device-tree support" adds a new __devinit function that is called
from stmmac_pltfr_probe.

Without this patch, building socfpga_defconfig results in:

WARNING: drivers/net/ethernet/stmicro/stmmac/stmmac.o(.text+0x5d4c): Section mismatch in reference from the function stmmac_pltfr_probe() to the function .devinit.text:stmmac_probe_config_dt()
The function stmmac_pltfr_probe() references
the function __devinit stmmac_probe_config_dt().
This is often because stmmac_pltfr_probe lacks a __devinit
annotation or the annotation of stmmac_probe_config_dt is wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index cd01ee7..b93245c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -74,7 +74,7 @@ static int __devinit stmmac_probe_config_dt(struct platform_device *pdev,
  * the necessary resources and invokes the main to init
  * the net device, register the mdio bus etc.
  */
-static int stmmac_pltfr_probe(struct platform_device *pdev)
+static int __devinit stmmac_pltfr_probe(struct platform_device *pdev)
 {
 	int ret = 0;
 	struct resource *res;
-- 
1.7.10


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

* [PATCH 08/11] mtd/omap2: fix dmaengine_slave_config error handling
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
                   ` (6 preceding siblings ...)
  2012-08-08 14:47 ` [PATCH 07/11] net/stmmac: mark probe function as __devinit Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-08 14:47 ` [PATCH 09/11] regulator/twl: remove fixed resource handling Arnd Bergmann
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Russell King, Grazvydas Ignotas

The newly added dmaengine support in the omap2 nand driver
potentially causes an undefined return value from the
omap_nand_probe function when dmaengine_slave_config
reports an error. Let's handle this by returning the
same error back to the caller.

Without this patch, building omap2plus_defconfig results in:

drivers/mtd/nand/omap2.c: In function 'omap_nand_probe':
drivers/mtd/nand/omap2.c:1154:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Grazvydas Ignotas <notasas@gmail.com>
---
 drivers/mtd/nand/omap2.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index e9309b3..ac4fd75 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1245,7 +1245,6 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 			goto out_release_mem_region;
 		} else {
 			struct dma_slave_config cfg;
-			int rc;
 
 			memset(&cfg, 0, sizeof(cfg));
 			cfg.src_addr = info->phys_base;
@@ -1254,10 +1253,10 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 			cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 			cfg.src_maxburst = 16;
 			cfg.dst_maxburst = 16;
-			rc = dmaengine_slave_config(info->dma, &cfg);
-			if (rc) {
+			err = dmaengine_slave_config(info->dma, &cfg);
+			if (err) {
 				dev_err(&pdev->dev, "DMA engine slave config failed: %d\n",
-					rc);
+					err);
 				goto out_release_mem_region;
 			}
 			info->nand.read_buf   = omap_read_buf_dma_pref;
-- 
1.7.10


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

* [PATCH 09/11] regulator/twl: remove fixed resource handling
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
                   ` (7 preceding siblings ...)
  2012-08-08 14:47 ` [PATCH 08/11] mtd/omap2: fix dmaengine_slave_config error handling Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-08 14:50   ` Mark Brown
  2012-08-08 14:47 ` [PATCH 10/11] spi/s3c64xx: improve error handling Arnd Bergmann
  2012-08-08 14:47 ` [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS Arnd Bergmann
  10 siblings, 1 reply; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: arm, linux-kernel, Arnd Bergmann, Mark Brown

The recent patch 0e8e5c34cf "regulator: twl: Remove references to
32kHz clock from DT bindings" removed the only use of the fake
"CLK32KG" regulator but not the TWL6030_FIXED_RESOURCE and
twl6030_fixed_resource definitions that are unused otherwise.

Without this patch, building omap2plus_defconfig results in:

drivers/regulator/twl-regulator.c:1051:27: warning: 'TWLRES_INFO_CLK32KG' defined but not used [-Wunused-variable]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/regulator/twl-regulator.c |   21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 242fe90..514a84b 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -659,13 +659,6 @@ static struct regulator_ops twl6030fixed_ops = {
 	.get_status	= twl6030reg_get_status,
 };
 
-static struct regulator_ops twl6030_fixed_resource = {
-	.enable		= twl6030reg_enable,
-	.disable	= twl6030reg_disable,
-	.is_enabled	= twl6030reg_is_enabled,
-	.get_status	= twl6030reg_get_status,
-};
-
 /*
  * SMPS status and control
  */
@@ -967,19 +960,6 @@ static struct twlreg_info TWLFIXED_INFO_##label = { \
 		}, \
 	}
 
-#define TWL6030_FIXED_RESOURCE(label, offset, turnon_delay) \
-static struct twlreg_info TWLRES_INFO_##label = { \
-	.base = offset, \
-	.desc = { \
-		.name = #label, \
-		.id = TWL6030_REG_##label, \
-		.ops = &twl6030_fixed_resource, \
-		.type = REGULATOR_VOLTAGE, \
-		.owner = THIS_MODULE, \
-		.enable_time = turnon_delay, \
-		}, \
-	}
-
 #define TWL6025_ADJUSTABLE_SMPS(label, offset) \
 static struct twlreg_info TWLSMPS_INFO_##label = { \
 	.base = offset, \
@@ -1048,7 +1028,6 @@ TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 0);
 TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 0);
 TWL6030_FIXED_LDO(V1V8, 0x16, 1800, 0);
 TWL6030_FIXED_LDO(V2V1, 0x1c, 2100, 0);
-TWL6030_FIXED_RESOURCE(CLK32KG, 0x8C, 0);
 TWL6025_ADJUSTABLE_SMPS(SMPS3, 0x34);
 TWL6025_ADJUSTABLE_SMPS(SMPS4, 0x10);
 TWL6025_ADJUSTABLE_SMPS(VIO, 0x16);
-- 
1.7.10


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

* [PATCH 10/11] spi/s3c64xx: improve error handling
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
                   ` (8 preceding siblings ...)
  2012-08-08 14:47 ` [PATCH 09/11] regulator/twl: remove fixed resource handling Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-10  6:39   ` Kukjin Kim
  2012-08-10  6:58   ` Thomas Abraham
  2012-08-08 14:47 ` [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS Arnd Bergmann
  10 siblings, 2 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Thomas Abraham,
	Jaswinder Singh, Grant Likely, Kukjin Kim

When a device tree definition os an s3c64xx SPI master is missing
a "controller-data" subnode, the newly added s3c64xx_get_slave_ctrldata
function might use uninitialized memory in place of that node,
which was correctly reported by gcc.

Without this patch, building s3c6400_defconfig results in:

drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata.isra.25':
drivers/spi/spi-s3c64xx.c:841:5: warning: 'data_np' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Jaswinder Singh <jaswinder.singh@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Kukjin Kim <kgene.kim@samsung.com>
---
 drivers/spi/spi-s3c64xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 646a765..cfa2c35 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -826,7 +826,7 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
 				struct spi_device *spi)
 {
 	struct s3c64xx_spi_csinfo *cs;
-	struct device_node *slave_np, *data_np;
+	struct device_node *slave_np, *data_np = NULL;
 	u32 fb_delay = 0;
 
 	slave_np = spi->dev.of_node;
-- 
1.7.10


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

* [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS
       [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
                   ` (9 preceding siblings ...)
  2012-08-08 14:47 ` [PATCH 10/11] spi/s3c64xx: improve error handling Arnd Bergmann
@ 2012-08-08 14:47 ` Arnd Bergmann
  2012-08-08 15:40   ` Stephen Warren
  2012-08-08 18:11   ` Kevin Hilman
  10 siblings, 2 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 14:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: arm, linux-kernel, Arnd Bergmann, Rafael J. Wysocki,
	Takashi Iwai, Laxman Dewangan

A few drivers use a construct like

 #ifdef CONFIG_PM
 static int foo_suspend(struct device *pdev)
 {
    ...
 }
 static int foo_resume struct device *pdev)
 {
    ...
 }
 #endif
 static SIMPLE_DEV_PM_OPS(foo_pm, foo_suspend, foo_resume);

which leaves the two functions unused if CONFIG_PM is enabled
but CONFIG_PM_SLEEP is disabled. I found this while building
all defconfig files on ARM. It's not clear to me if this is
the right solution, but at least it makes the code consistent
again.

Without this patch, building omap1_defconfig results in:

drivers/char/hw_random/omap-rng.c:165:12: warning: 'omap_rng_suspend' defined but not used [-Wunused-function]
drivers/char/hw_random/omap-rng.c:171:12: warning: 'omap_rng_resume' defined but not used [-Wunused-function]
sound/drivers/dummy.c:1068:12: warning: 'snd_dummy_suspend' defined but not used [-Wunused-function]
sound/drivers/dummy.c:1078:12: warning: 'snd_dummy_resume' defined but not used [-Wunused-function]

and building tegra_defconfig results in:

drivers/i2c/busses/i2c-tegra.c:716:12: warning: 'tegra_i2c_suspend' defined but not used [-Wunused-function]
drivers/i2c/busses/i2c-tegra.c:727:12: warning: 'tegra_i2c_resume' defined but not used [-Wunused-function]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/char/hw_random/omap-rng.c |    2 +-
 drivers/i2c/busses/i2c-tegra.c    |    2 +-
 sound/drivers/dummy.c             |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index d706bd0e..4fbdceb 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -160,7 +160,7 @@ static int __exit omap_rng_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 
 static int omap_rng_suspend(struct device *dev)
 {
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 66eb53f..9a08c57 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -712,7 +712,7 @@ static int __devexit tegra_i2c_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int tegra_i2c_suspend(struct device *dev)
 {
 	struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev);
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index f7d3bfc..54bb664 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -1064,7 +1064,7 @@ static int __devexit snd_dummy_remove(struct platform_device *devptr)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int snd_dummy_suspend(struct device *pdev)
 {
 	struct snd_card *card = dev_get_drvdata(pdev);
-- 
1.7.10


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

* Re: [PATCH 09/11] regulator/twl: remove fixed resource handling
  2012-08-08 14:47 ` [PATCH 09/11] regulator/twl: remove fixed resource handling Arnd Bergmann
@ 2012-08-08 14:50   ` Mark Brown
  2012-08-08 15:06     ` Arnd Bergmann
  0 siblings, 1 reply; 35+ messages in thread
From: Mark Brown @ 2012-08-08 14:50 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, arm, linux-kernel

On Wed, Aug 08, 2012 at 04:47:26PM +0200, Arnd Bergmann wrote:
> The recent patch 0e8e5c34cf "regulator: twl: Remove references to
> 32kHz clock from DT bindings" removed the only use of the fake
> "CLK32KG" regulator but not the TWL6030_FIXED_RESOURCE and
> twl6030_fixed_resource definitions that are unused otherwise.

I've already got a fix for this in my tree.

Please do also make an effort to use subject lines that match the style
of the subsystem.

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

* Re: [PATCH 09/11] regulator/twl: remove fixed resource handling
  2012-08-08 14:50   ` Mark Brown
@ 2012-08-08 15:06     ` Arnd Bergmann
  0 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 15:06 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-arm-kernel, arm, linux-kernel

On Wednesday 08 August 2012, Mark Brown wrote:
> On Wed, Aug 08, 2012 at 04:47:26PM +0200, Arnd Bergmann wrote:
> > The recent patch 0e8e5c34cf "regulator: twl: Remove references to
> > 32kHz clock from DT bindings" removed the only use of the fake
> > "CLK32KG" regulator but not the TWL6030_FIXED_RESOURCE and
> > twl6030_fixed_resource definitions that are unused otherwise.
> 
> I've already got a fix for this in my tree.

Ok, dropping it here.

	Arnd

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

* Re: [PATCH 07/11] net/stmmac: mark probe function as __devinit
  2012-08-08 14:47 ` [PATCH 07/11] net/stmmac: mark probe function as __devinit Arnd Bergmann
@ 2012-08-08 15:07   ` Stefan Roese
  2012-08-08 23:08   ` David Miller
  1 sibling, 0 replies; 35+ messages in thread
From: Stefan Roese @ 2012-08-08 15:07 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, arm, linux-kernel, Giuseppe Cavallaro,
	David S. Miller, netdev

On 08/08/2012 04:47 PM, Arnd Bergmann wrote:
> Driver probe functions are generally __devinit so they will be
> discarded after initialization for non-hotplug kernels.
> This was found by a new warning after patch 6a228452d "stmmac: Add
> device-tree support" adds a new __devinit function that is called
> from stmmac_pltfr_probe.
> 
> Without this patch, building socfpga_defconfig results in:
> 
> WARNING: drivers/net/ethernet/stmicro/stmmac/stmmac.o(.text+0x5d4c): Section mismatch in reference from the function stmmac_pltfr_probe() to the function .devinit.text:stmmac_probe_config_dt()
> The function stmmac_pltfr_probe() references
> the function __devinit stmmac_probe_config_dt().
> This is often because stmmac_pltfr_probe lacks a __devinit
> annotation or the annotation of stmmac_probe_config_dt is wrong.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: netdev@vger.kernel.org

Acked-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* Re: [PATCH 03/11] usb/ohci-omap: remove unused variable
  2012-08-08 14:47 ` [PATCH 03/11] usb/ohci-omap: remove unused variable Arnd Bergmann
@ 2012-08-08 15:25   ` Greg Kroah-Hartman
  2012-08-08 15:34   ` Alan Stern
  1 sibling, 0 replies; 35+ messages in thread
From: Greg Kroah-Hartman @ 2012-08-08 15:25 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, arm, linux-kernel, Richard Zhao, Alan Stern

On Wed, Aug 08, 2012 at 04:47:20PM +0200, Arnd Bergmann wrote:
> Commit c2e935a7d "USB: move transceiver from ehci_hcd and ohci_hcd to
> hcd and rename it as phy" removed the last use of the "ohci" variable
> in the usb_hcd_omap_remove function, but left the variable in place
> unused.
> 
> Without this patch, building omap1_defconfig results in:
> 
> In file included from drivers/usb/host/ohci-hcd.c:1013:0:
> drivers/usb/host/ohci-omap.c: In function 'usb_hcd_omap_remove':
> drivers/usb/host/ohci-omap.c:406:19: warning: unused variable 'ohci' [-Wunused-variable]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Richard Zhao <richard.zhao@freescale.com>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

* Re: [PATCH 03/11] usb/ohci-omap: remove unused variable
  2012-08-08 14:47 ` [PATCH 03/11] usb/ohci-omap: remove unused variable Arnd Bergmann
  2012-08-08 15:25   ` Greg Kroah-Hartman
@ 2012-08-08 15:34   ` Alan Stern
  1 sibling, 0 replies; 35+ messages in thread
From: Alan Stern @ 2012-08-08 15:34 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, arm, linux-kernel, Richard Zhao, Greg Kroah-Hartman

On Wed, 8 Aug 2012, Arnd Bergmann wrote:

> Commit c2e935a7d "USB: move transceiver from ehci_hcd and ohci_hcd to
> hcd and rename it as phy" removed the last use of the "ohci" variable
> in the usb_hcd_omap_remove function, but left the variable in place
> unused.
> 
> Without this patch, building omap1_defconfig results in:
> 
> In file included from drivers/usb/host/ohci-hcd.c:1013:0:
> drivers/usb/host/ohci-omap.c: In function 'usb_hcd_omap_remove':
> drivers/usb/host/ohci-omap.c:406:19: warning: unused variable 'ohci' [-Wunused-variable]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Richard Zhao <richard.zhao@freescale.com>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/usb/host/ohci-omap.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
> index e7d75d2..f8b2d91 100644
> --- a/drivers/usb/host/ohci-omap.c
> +++ b/drivers/usb/host/ohci-omap.c
> @@ -403,8 +403,6 @@ err0:
>  static inline void
>  usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
>  {
> -	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);
> -
>  	usb_remove_hcd(hcd);
>  	if (!IS_ERR_OR_NULL(hcd->phy)) {
>  		(void) otg_set_host(hcd->phy->otg, 0);
> 

Acked-by: Alan Stern <stern@rowland.harvard.edu>


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

* Re: [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS
  2012-08-08 14:47 ` [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS Arnd Bergmann
@ 2012-08-08 15:40   ` Stephen Warren
  2012-08-08 16:22     ` Arnd Bergmann
  2012-08-08 18:11   ` Kevin Hilman
  1 sibling, 1 reply; 35+ messages in thread
From: Stephen Warren @ 2012-08-08 15:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, arm, linux-kernel, Rafael J. Wysocki,
	Takashi Iwai, Laxman Dewangan

On 08/08/2012 08:47 AM, Arnd Bergmann wrote:
> A few drivers use a construct like
> 
>  #ifdef CONFIG_PM
>  static int foo_suspend(struct device *pdev)
>  {
>     ...
>  }
>  static int foo_resume struct device *pdev)
>  {
>     ...
>  }
>  #endif
>  static SIMPLE_DEV_PM_OPS(foo_pm, foo_suspend, foo_resume);
...
> drivers/i2c/busses/i2c-tegra.c:716:12: warning: 'tegra_i2c_suspend' defined but not used [-Wunused-function]
> drivers/i2c/busses/i2c-tegra.c:727:12: warning: 'tegra_i2c_resume' defined but not used [-Wunused-function]

Laxman already posted a patch for this, which I'm hoping will make it
into 3.6, through the I2C tree.

http://www.spinics.net/lists/linux-i2c/msg09359.html

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

* Re: [PATCH 04/11] ARM: ux500: really kill snowball_of_platform_devs
  2012-08-08 14:47 ` [PATCH 04/11] ARM: ux500: really kill snowball_of_platform_devs Arnd Bergmann
@ 2012-08-08 16:22   ` Lee Jones
  2012-08-08 17:19     ` Arnd Bergmann
  0 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2012-08-08 16:22 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, arm, linux-kernel, Linus Walleij

On Wed, Aug 08, 2012 at 04:47:21PM +0200, Arnd Bergmann wrote:
> Commit fc67a597a "ARM: ux500: Remove temporary snowball_of_platform_devs
> enablement structure" removed the only user of this variable, but did
> not actually remove the array itself.
> 
> Without this patch, building u8500_defconfig results in:
> 
> arch/arm/mach-ux500/board-mop500.c:729:32: warning: 'snowball_of_platform_devs' defined but not used [-Wunused-variable]

I've already sent a patch that does this:

https://lkml.org/lkml/2012/7/31/305

Just waiting on Linus to review the set.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS
  2012-08-08 15:40   ` Stephen Warren
@ 2012-08-08 16:22     ` Arnd Bergmann
  2012-08-08 16:43       ` Takashi Iwai
  0 siblings, 1 reply; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 16:22 UTC (permalink / raw)
  To: Stephen Warren
  Cc: linux-arm-kernel, arm, linux-kernel, Rafael J. Wysocki,
	Takashi Iwai, Laxman Dewangan

On Wednesday 08 August 2012, Stephen Warren wrote:
> On 08/08/2012 08:47 AM, Arnd Bergmann wrote:
> > A few drivers use a construct like
> > 
> >  #ifdef CONFIG_PM
> >  static int foo_suspend(struct device *pdev)
> >  {
> >     ...
> >  }
> >  static int foo_resume struct device *pdev)
> >  {
> >     ...
> >  }
> >  #endif
> >  static SIMPLE_DEV_PM_OPS(foo_pm, foo_suspend, foo_resume);
> ...
> > drivers/i2c/busses/i2c-tegra.c:716:12: warning: 'tegra_i2c_suspend' defined but not used [-Wunused-function]
> > drivers/i2c/busses/i2c-tegra.c:727:12: warning: 'tegra_i2c_resume' defined but not used [-Wunused-function]
> 
> Laxman already posted a patch for this, which I'm hoping will make it
> into 3.6, through the I2C tree.
> 
> http://www.spinics.net/lists/linux-i2c/msg09359.html

Ok, dropping this one then.

Thanks,

	Arnd

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

* Re: [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS
  2012-08-08 16:22     ` Arnd Bergmann
@ 2012-08-08 16:43       ` Takashi Iwai
  2012-08-08 17:26         ` Arnd Bergmann
  0 siblings, 1 reply; 35+ messages in thread
From: Takashi Iwai @ 2012-08-08 16:43 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stephen Warren, linux-arm-kernel, arm, linux-kernel,
	Rafael J. Wysocki, Laxman Dewangan

At Wed, 8 Aug 2012 16:22:29 +0000,
Arnd Bergmann wrote:
> 
> On Wednesday 08 August 2012, Stephen Warren wrote:
> > On 08/08/2012 08:47 AM, Arnd Bergmann wrote:
> > > A few drivers use a construct like
> > > 
> > >  #ifdef CONFIG_PM
> > >  static int foo_suspend(struct device *pdev)
> > >  {
> > >     ...
> > >  }
> > >  static int foo_resume struct device *pdev)
> > >  {
> > >     ...
> > >  }
> > >  #endif
> > >  static SIMPLE_DEV_PM_OPS(foo_pm, foo_suspend, foo_resume);
> > ...
> > > drivers/i2c/busses/i2c-tegra.c:716:12: warning: 'tegra_i2c_suspend' defined but not used [-Wunused-function]
> > > drivers/i2c/busses/i2c-tegra.c:727:12: warning: 'tegra_i2c_resume' defined but not used [-Wunused-function]
> > 
> > Laxman already posted a patch for this, which I'm hoping will make it
> > into 3.6, through the I2C tree.
> > 
> > http://www.spinics.net/lists/linux-i2c/msg09359.html
> 
> Ok, dropping this one then.

I'm going to fix the similar errors in sound tree tomorrow, too.


thanks,

Takashi

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

* Re: [PATCH 04/11] ARM: ux500: really kill snowball_of_platform_devs
  2012-08-08 16:22   ` Lee Jones
@ 2012-08-08 17:19     ` Arnd Bergmann
  0 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 17:19 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, arm, linux-kernel, Linus Walleij

On Wednesday 08 August 2012, Lee Jones wrote:
> On Wed, Aug 08, 2012 at 04:47:21PM +0200, Arnd Bergmann wrote:
> > Commit fc67a597a "ARM: ux500: Remove temporary snowball_of_platform_devs
> > enablement structure" removed the only user of this variable, but did
> > not actually remove the array itself.
> > 
> > Without this patch, building u8500_defconfig results in:
> > 
> > arch/arm/mach-ux500/board-mop500.c:729:32: warning: 'snowball_of_platform_devs' defined but not used [-Wunused-variable]
> 
> I've already sent a patch that does this:
> 
> https://lkml.org/lkml/2012/7/31/305
> 
> Just waiting on Linus to review the set.

Ok, I've removed my version.

	Arnd


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

* Re: [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS
  2012-08-08 16:43       ` Takashi Iwai
@ 2012-08-08 17:26         ` Arnd Bergmann
  2012-08-08 19:25           ` Rafael J. Wysocki
  2012-08-20  8:32           ` Herbert Xu
  0 siblings, 2 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 17:26 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Stephen Warren, linux-arm-kernel, arm, linux-kernel,
	Rafael J. Wysocki, Laxman Dewangan, Herbert Xu

On Wednesday 08 August 2012, Takashi Iwai wrote:
> At Wed, 8 Aug 2012 16:22:29 +0000,
> Arnd Bergmann wrote:
> > > Laxman already posted a patch for this, which I'm hoping will make it
> > > into 3.6, through the I2C tree.
> > > 
> > > http://www.spinics.net/lists/linux-i2c/msg09359.html
> > 
> > Ok, dropping this one then.
> 
> I'm going to fix the similar errors in sound tree tomorrow, too.
> 

Ok. this leaves the omap-rng driver, and my patch comes down to the below.
Thanks!

	Arnd

8<----

>From d83e9e0e5c0e41a0ee2ba6293c8be21e54988f99 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Sat, 4 Aug 2012 07:11:34 +0000
Subject: [PATCH] omap-rng: fix use of SIMPLE_DEV_PM_OPS

omap_rng_suspend and omap_rng_resume are unused if CONFIG_PM is enabled
but CONFIG_PM_SLEEP is disabled. I found this while building all defconfig
files on ARM. It's not clear to me if this is the right solution, but
at least it makes the code consistent again.

Without this patch, building omap1_defconfig results in:

drivers/char/hw_random/omap-rng.c:165:12: warning: 'omap_rng_suspend' defined but not used [-Wunused-function]
drivers/char/hw_random/omap-rng.c:171:12: warning: 'omap_rng_resume' defined but not used [-Wunused-function]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index d706bd0e..4fbdceb 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -160,7 +160,7 @@ static int __exit omap_rng_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 
 static int omap_rng_suspend(struct device *dev)
 {


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

* Re: [PATCH 01/11] ARM: topology: mark init_cpu_topology as __init
  2012-08-08 14:47 ` [PATCH 01/11] ARM: topology: mark init_cpu_topology as __init Arnd Bergmann
@ 2012-08-08 17:53   ` Stephen Boyd
  2012-08-08 19:14     ` Arnd Bergmann
  0 siblings, 1 reply; 35+ messages in thread
From: Stephen Boyd @ 2012-08-08 17:53 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Vincent Guittot, Peter Zijlstra, linux-kernel,
	arm, Russell King, Namhyung Kim

On 08/08/12 07:47, Arnd Bergmann wrote:
> The init_cpu_topology function can be put into the __init section
> and discarded after boot, because it is only called from
> smp_prepare_cpus, which is also marked __init. This was reported
> by gcc after Vincent Guittot added the parse_dt_topology function
> in 339ca09d7ada "ARM: 7463/1: topology: Update cpu_power according to DT
> information".
>
> Without this patch, building kzm9g_defconfig results in:
>
> WARNING: vmlinux.o(.text+0xb5a0): Section mismatch in reference from the function init_cpu_topology() to the function .init.text:parse_dt_topology()
> The function init_cpu_topology() references
> the function __init parse_dt_topology().
> This is often because init_cpu_topology lacks a __init
> annotation or the annotation of parse_dt_topology is wrong.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Vincent Guittot <vincent.guittot@linaro.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> ---

This is already in the patch tracker

http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7482/1

I also notice that store_cpu_topology() should be marked __cpuinit and
update_siblings_mask, middle_capacity, cpu_capacity, and
update_cpu_power should be static. We should probably also rename
update_cpu_power() so as to not conflict with the one in kernel/sched/fair.c

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


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

* Re: [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS
  2012-08-08 14:47 ` [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS Arnd Bergmann
  2012-08-08 15:40   ` Stephen Warren
@ 2012-08-08 18:11   ` Kevin Hilman
  1 sibling, 0 replies; 35+ messages in thread
From: Kevin Hilman @ 2012-08-08 18:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Takashi Iwai, linux-kernel, Rafael J. Wysocki,
	arm, Laxman Dewangan

Arnd Bergmann <arnd@arndb.de> writes:

> A few drivers use a construct like
>
>  #ifdef CONFIG_PM
>  static int foo_suspend(struct device *pdev)
>  {
>     ...
>  }
>  static int foo_resume struct device *pdev)
>  {
>     ...
>  }
>  #endif
>  static SIMPLE_DEV_PM_OPS(foo_pm, foo_suspend, foo_resume);
>
> which leaves the two functions unused if CONFIG_PM is enabled
> but CONFIG_PM_SLEEP is disabled. I found this while building
> all defconfig files on ARM. It's not clear to me if this is
> the right solution, but at least it makes the code consistent
> again.
>
> Without this patch, building omap1_defconfig results in:
>
> drivers/char/hw_random/omap-rng.c:165:12: warning: 'omap_rng_suspend' defined but not used [-Wunused-function]
> drivers/char/hw_random/omap-rng.c:171:12: warning: 'omap_rng_resume' defined but not used [-Wunused-function]
> sound/drivers/dummy.c:1068:12: warning: 'snd_dummy_suspend' defined but not used [-Wunused-function]
> sound/drivers/dummy.c:1078:12: warning: 'snd_dummy_resume' defined but not used [-Wunused-function]
>
> and building tegra_defconfig results in:
>
> drivers/i2c/busses/i2c-tegra.c:716:12: warning: 'tegra_i2c_suspend' defined but not used [-Wunused-function]
> drivers/i2c/busses/i2c-tegra.c:727:12: warning: 'tegra_i2c_resume' defined but not used [-Wunused-function]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Laxman Dewangan <ldewangan@nvidia.com>
> ---
>  drivers/char/hw_random/omap-rng.c |    2 +-

For the OMAP change,

Acked-by: Kevin Hilman <khilman@ti.com>


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

* Re: [PATCH 01/11] ARM: topology: mark init_cpu_topology as __init
  2012-08-08 17:53   ` Stephen Boyd
@ 2012-08-08 19:14     ` Arnd Bergmann
  0 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-08 19:14 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linux-arm-kernel, Vincent Guittot, Peter Zijlstra, linux-kernel,
	arm, Russell King, Namhyung Kim

On Wednesday 08 August 2012, Stephen Boyd wrote:
> 
> On 08/08/12 07:47, Arnd Bergmann wrote:
> > The init_cpu_topology function can be put into the __init section
> > and discarded after boot, because it is only called from
> > smp_prepare_cpus, which is also marked __init. This was reported
> > by gcc after Vincent Guittot added the parse_dt_topology function
> > in 339ca09d7ada "ARM: 7463/1: topology: Update cpu_power according to DT
> > information".
> >
> > Without this patch, building kzm9g_defconfig results in:
> >
> > WARNING: vmlinux.o(.text+0xb5a0): Section mismatch in reference from the function init_cpu_topology() to the function .init.text:parse_dt_topology()
> > The function init_cpu_topology() references
> > the function __init parse_dt_topology().
> > This is often because init_cpu_topology lacks a __init
> > annotation or the annotation of parse_dt_topology is wrong.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Cc: Vincent Guittot <vincent.guittot@linaro.org>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> 
> This is already in the patch tracker
> 
> http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7482/1

Ok, dropped here.

> I also notice that store_cpu_topology() should be marked __cpuinit and
> update_siblings_mask, middle_capacity, cpu_capacity, and
> update_cpu_power should be static. We should probably also rename
> update_cpu_power() so as to not conflict with the one in kernel/sched/fair.c

Yes, all good points. 

	Arnd

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

* Re: [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS
  2012-08-08 17:26         ` Arnd Bergmann
@ 2012-08-08 19:25           ` Rafael J. Wysocki
  2012-08-20  8:32           ` Herbert Xu
  1 sibling, 0 replies; 35+ messages in thread
From: Rafael J. Wysocki @ 2012-08-08 19:25 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Takashi Iwai, Stephen Warren, linux-arm-kernel, arm,
	linux-kernel, Laxman Dewangan, Herbert Xu

On Wednesday, August 08, 2012, Arnd Bergmann wrote:
> On Wednesday 08 August 2012, Takashi Iwai wrote:
> > At Wed, 8 Aug 2012 16:22:29 +0000,
> > Arnd Bergmann wrote:
> > > > Laxman already posted a patch for this, which I'm hoping will make it
> > > > into 3.6, through the I2C tree.
> > > > 
> > > > http://www.spinics.net/lists/linux-i2c/msg09359.html
> > > 
> > > Ok, dropping this one then.
> > 
> > I'm going to fix the similar errors in sound tree tomorrow, too.
> > 
> 
> Ok. this leaves the omap-rng driver, and my patch comes down to the below.
> Thanks!

Looks good!

Sorry for introducing those warnings in the first place, I should have been
more careful about that.

Thanks,
Rafael


> 8<----
> 
> From d83e9e0e5c0e41a0ee2ba6293c8be21e54988f99 Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Sat, 4 Aug 2012 07:11:34 +0000
> Subject: [PATCH] omap-rng: fix use of SIMPLE_DEV_PM_OPS
> 
> omap_rng_suspend and omap_rng_resume are unused if CONFIG_PM is enabled
> but CONFIG_PM_SLEEP is disabled. I found this while building all defconfig
> files on ARM. It's not clear to me if this is the right solution, but
> at least it makes the code consistent again.
> 
> Without this patch, building omap1_defconfig results in:
> 
> drivers/char/hw_random/omap-rng.c:165:12: warning: 'omap_rng_suspend' defined but not used [-Wunused-function]
> drivers/char/hw_random/omap-rng.c:171:12: warning: 'omap_rng_resume' defined but not used [-Wunused-function]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> 
> diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
> index d706bd0e..4fbdceb 100644
> --- a/drivers/char/hw_random/omap-rng.c
> +++ b/drivers/char/hw_random/omap-rng.c
> @@ -160,7 +160,7 @@ static int __exit omap_rng_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
>  
>  static int omap_rng_suspend(struct device *dev)
>  {
> 
> 
> 


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

* Re: [PATCH 07/11] net/stmmac: mark probe function as __devinit
  2012-08-08 14:47 ` [PATCH 07/11] net/stmmac: mark probe function as __devinit Arnd Bergmann
  2012-08-08 15:07   ` Stefan Roese
@ 2012-08-08 23:08   ` David Miller
  1 sibling, 0 replies; 35+ messages in thread
From: David Miller @ 2012-08-08 23:08 UTC (permalink / raw)
  To: arnd; +Cc: linux-arm-kernel, arm, linux-kernel, sr, peppe.cavallaro, netdev

From: Arnd Bergmann <arnd@arndb.de>
Date: Wed,  8 Aug 2012 16:47:24 +0200

> Driver probe functions are generally __devinit so they will be
> discarded after initialization for non-hotplug kernels.
> This was found by a new warning after patch 6a228452d "stmmac: Add
> device-tree support" adds a new __devinit function that is called
> from stmmac_pltfr_probe.
> 
> Without this patch, building socfpga_defconfig results in:
> 
> WARNING: drivers/net/ethernet/stmicro/stmmac/stmmac.o(.text+0x5d4c): Section mismatch in reference from the function stmmac_pltfr_probe() to the function .devinit.text:stmmac_probe_config_dt()
> The function stmmac_pltfr_probe() references
> the function __devinit stmmac_probe_config_dt().
> This is often because stmmac_pltfr_probe lacks a __devinit
> annotation or the annotation of stmmac_probe_config_dt is wrong.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: netdev@vger.kernel.org

Applied, thanks.

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

* RE: [PATCH 10/11] spi/s3c64xx: improve error handling
  2012-08-08 14:47 ` [PATCH 10/11] spi/s3c64xx: improve error handling Arnd Bergmann
@ 2012-08-10  6:39   ` Kukjin Kim
  2012-08-10  7:34     ` Arnd Bergmann
  2012-08-10  6:58   ` Thomas Abraham
  1 sibling, 1 reply; 35+ messages in thread
From: Kukjin Kim @ 2012-08-10  6:39 UTC (permalink / raw)
  To: 'Arnd Bergmann', linux-arm-kernel
  Cc: arm, linux-kernel, 'Thomas Abraham',
	'Jaswinder Singh', 'Grant Likely'

Arnd Bergmann wrote:
> 
> When a device tree definition os an s3c64xx SPI master is missing
> a "controller-data" subnode, the newly added s3c64xx_get_slave_ctrldata
> function might use uninitialized memory in place of that node,
> which was correctly reported by gcc.
> 
> Without this patch, building s3c6400_defconfig results in:
> 
> drivers/spi/spi-s3c64xx.c: In function
> 's3c64xx_get_slave_ctrldata.isra.25':
> drivers/spi/spi-s3c64xx.c:841:5: warning: 'data_np' may be used
> uninitialized in this function [-Wuninitialized]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Thomas Abraham <thomas.abraham@linaro.org>
> Cc: Jaswinder Singh <jaswinder.singh@linaro.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> ---
>  drivers/spi/spi-s3c64xx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 646a765..cfa2c35 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -826,7 +826,7 @@ static struct s3c64xx_spi_csinfo
> *s3c64xx_get_slave_ctrldata(
>  				struct spi_device *spi)
>  {
>  	struct s3c64xx_spi_csinfo *cs;
> -	struct device_node *slave_np, *data_np;
> +	struct device_node *slave_np, *data_np = NULL;
>  	u32 fb_delay = 0;
> 
>  	slave_np = spi->dev.of_node;
> --
> 1.7.10

Looks ok to me,
Acked-by: Kukjin Kim <kgene.kim@samsung.com>

BTW for same reason, probably, we need following fix?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

----
From: Kukjin Kim <kgene.kim@samsung.com>

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-tegra/tegra2_emc.c             |    4 ++--
 arch/c6x/kernel/setup.c                      |    2 +-
 arch/powerpc/kernel/ibmebus.c                |    2 +-
 arch/powerpc/kernel/pci_of_scan.c            |    2 +-
 arch/powerpc/kernel/prom.c                   |    2 +-
 arch/powerpc/kernel/rtas_pci.c               |    2 +-
 arch/powerpc/kernel/vio.c                    |    2 +-
 arch/powerpc/platforms/44x/warp.c            |    2 +-
 arch/powerpc/platforms/cell/setup.c          |    2 +-
 arch/powerpc/platforms/powernv/opal.c        |    2 +-
 arch/powerpc/platforms/powernv/pci-ioda.c    |    2 +-
 arch/powerpc/platforms/powernv/pci-p5ioc2.c  |    2 +-
 arch/powerpc/platforms/pseries/eeh.c         |   12 ++++++------
 arch/powerpc/sysdev/mv64x60_dev.c            |    2 +-
 drivers/dma/fsldma.c                         |    2 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c  |    2 +-
 drivers/hwmon/ads1015.c                      |    2 +-
 drivers/i2c/busses/i2c-powermac.c            |    2 +-
 drivers/i2c/busses/i2c-pxa-pci.c             |    2 +-
 drivers/i2c/i2c-mux.c                        |    2 +-
 drivers/iio/adc/at91_adc.c                   |    2 +-
 drivers/input/keyboard/samsung-keypad.c      |    2 +-
 drivers/leds/leds-gpio.c                     |    2 +-
 drivers/net/ethernet/freescale/fsl_pq_mdio.c |    2 +-
 drivers/net/phy/mdio-mux.c                   |    2 +-
 drivers/of/of_i2c.c                          |    2 +-
 drivers/of/of_mdio.c                         |    2 +-
 drivers/of/of_pci.c                          |    2 +-
 drivers/of/platform.c                        |    6 +++---
 drivers/pinctrl/pinctrl-imx.c                |    4 ++--
 drivers/pinctrl/pinctrl-tegra.c              |    2 +-
 drivers/pinctrl/spear/pinctrl-spear.c        |    2 +-
 drivers/regulator/da9052-regulator.c         |    2 +-
 drivers/regulator/mc13xxx-regulator-core.c   |    2 +-
 drivers/regulator/of_regulator.c             |    2 +-
 drivers/spi/spi.c                            |    2 +-
 drivers/tty/hvc/hvc_opal.c                   |    2 +-
 37 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/arch/arm/mach-tegra/tegra2_emc.c
b/arch/arm/mach-tegra/tegra2_emc.c
index 5070d83..d045a9e 100644
--- a/arch/arm/mach-tegra/tegra2_emc.c
+++ b/arch/arm/mach-tegra/tegra2_emc.c
@@ -181,7 +181,7 @@ int tegra_emc_set_rate(unsigned long rate)
 #ifdef CONFIG_OF
 static struct device_node *tegra_emc_ramcode_devnode(struct device_node
*np)
 {
-	struct device_node *iter;
+	struct device_node *iter = NULL;
 	u32 reg;
 
 	for_each_child_of_node(np, iter) {
@@ -198,7 +198,7 @@ static struct tegra_emc_pdata *tegra_emc_dt_parse_pdata(
 		struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
-	struct device_node *tnp, *iter;
+	struct device_node *tnp, *iter = NULL;
 	struct tegra_emc_pdata *pdata;
 	int ret, i, num_tables;
 
diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c
index f4e72bd..0f4cd29 100644
--- a/arch/c6x/kernel/setup.c
+++ b/arch/c6x/kernel/setup.c
@@ -99,7 +99,7 @@ static void __init get_cpuinfo(void)
 	unsigned long core_khz;
 	u64 tmp;
 	struct cpuinfo_c6x *p;
-	struct device_node *node, *np;
+	struct device_node *node, *np = NULL;
 
 	p = &per_cpu(cpu_data, smp_processor_id());
 
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index b01d14e..1147931 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -180,7 +180,7 @@ static int ibmebus_create_device(struct device_node *dn)
 
 static int ibmebus_create_devices(const struct of_device_id *matches)
 {
-	struct device_node *root, *child;
+	struct device_node *root, *child = NULL;
 	int ret = 0;
 
 	root = of_find_node_by_path("/");
diff --git a/arch/powerpc/kernel/pci_of_scan.c
b/arch/powerpc/kernel/pci_of_scan.c
index 30378a1..8344f9a 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -302,7 +302,7 @@ EXPORT_SYMBOL(of_scan_pci_bridge);
 static void __devinit __of_scan_bus(struct device_node *node,
 				    struct pci_bus *bus, int
rescan_existing)
 {
-	struct device_node *child;
+	struct device_node *child = NULL;
 	const u32 *reg;
 	int reglen, devfn;
 	struct pci_dev *dev;
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index f191bf0..b4a021e 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -735,7 +735,7 @@ void __init early_init_devtree(void *params)
  */
 struct device_node *of_find_next_cache_node(struct device_node *np)
 {
-	struct device_node *child;
+	struct device_node *child = NULL;
 	const phandle *handle;
 
 	handle = of_get_property(np, "l2-cache", NULL);
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 179af90..b75d76b 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -255,7 +255,7 @@ int __devinit rtas_setup_phb(struct pci_controller *phb)
 
 void __init find_and_init_phbs(void)
 {
-	struct device_node *node;
+	struct device_node *node = NULL;
 	struct pci_controller *phb;
 	struct device_node *root = of_find_node_by_path("/");
 
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 02b3221..37b2a76 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -116,7 +116,7 @@ static int vio_cmo_num_OF_devs(void)
 	 */
 	node_vroot = of_find_node_by_name(NULL, "vdevice");
 	if (node_vroot) {
-		struct device_node *of_node;
+		struct device_node *of_node = NULL;
 		struct property *prop;
 
 		for_each_child_of_node(node_vroot, of_node) {
diff --git a/arch/powerpc/platforms/44x/warp.c
b/arch/powerpc/platforms/44x/warp.c
index 4cfa499..b505ca7 100644
--- a/arch/powerpc/platforms/44x/warp.c
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -172,7 +172,7 @@ static irqreturn_t temp_isr(int irq, void *context)
 
 static int pika_setup_leds(void)
 {
-	struct device_node *np, *child;
+	struct device_node *np, *child = NULL;
 
 	np = of_find_compatible_node(NULL, NULL, "gpio-leds");
 	if (!np) {
diff --git a/arch/powerpc/platforms/cell/setup.c
b/arch/powerpc/platforms/cell/setup.c
index 4ab0876..356fb9c 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -155,7 +155,7 @@ static const struct of_device_id cell_bus_ids[]
__initconst = {
 static int __init cell_publish_devices(void)
 {
 	struct device_node *root = of_find_node_by_path("/");
-	struct device_node *np;
+	struct device_node *np = NULL;
 	int node;
 
 	/* Publish OF platform devices for southbridge IOs */
diff --git a/arch/powerpc/platforms/powernv/opal.c
b/arch/powerpc/platforms/powernv/opal.c
index aaa0dba..4df5f2d 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -279,7 +279,7 @@ static irqreturn_t opal_interrupt(int irq, void *data)
 
 static int __init opal_init(void)
 {
-	struct device_node *np, *consoles;
+	struct device_node *np = NULL, *consoles;
 	const u32 *irqs;
 	int rc, i, irqlen;
 
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c
b/arch/powerpc/platforms/powernv/pci-ioda.c
index 9cda6a1..e08c238 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -1317,7 +1317,7 @@ void __init pnv_pci_init_ioda1_phb(struct device_node
*np)
 
 void __init pnv_pci_init_ioda_hub(struct device_node *np)
 {
-	struct device_node *phbn;
+	struct device_node *phbn = NULL;
 	const u64 *prop64;
 	u64 hub_id;
 
diff --git a/arch/powerpc/platforms/powernv/pci-p5ioc2.c
b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
index 2649677..d2565d0 100644
--- a/arch/powerpc/platforms/powernv/pci-p5ioc2.c
+++ b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
@@ -175,7 +175,7 @@ static void __init pnv_pci_init_p5ioc2_phb(struct
device_node *np,
 
 void __init pnv_pci_init_p5ioc2_hub(struct device_node *np)
 {
-	struct device_node *phbn;
+	struct device_node *phbn = NULL;
 	const u64 *prop64;
 	u64 hub_id;
 	void *tce_mem;
diff --git a/arch/powerpc/platforms/pseries/eeh.c
b/arch/powerpc/platforms/pseries/eeh.c
index ecd394c..4b5913e 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -206,7 +206,7 @@ static size_t eeh_gather_pci_data(struct eeh_dev *edev,
char * buf, size_t len)
 
 	/* Gather status on devices under the bridge */
 	if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) {
-		struct device_node *child;
+		struct device_node *child = NULL;
 
 		for_each_child_of_node(dn, child) {
 			if (of_node_to_eeh_dev(child))
@@ -289,7 +289,7 @@ struct device_node *eeh_find_device_pe(struct
device_node *dn)
  */
 static void __eeh_mark_slot(struct device_node *parent, int mode_flag)
 {
-	struct device_node *dn;
+	struct device_node *dn = NULL;
 
 	for_each_child_of_node(parent, dn) {
 		if (of_node_to_eeh_dev(dn)) {
@@ -342,7 +342,7 @@ void eeh_mark_slot(struct device_node *dn, int
mode_flag)
  */
 static void __eeh_clear_slot(struct device_node *parent, int mode_flag)
 {
-	struct device_node *dn;
+	struct device_node *dn = NULL;
 
 	for_each_child_of_node(parent, dn) {
 		if (of_node_to_eeh_dev(dn)) {
@@ -601,7 +601,7 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev,
enum pcie_reset_state stat
  */
 void __eeh_set_pe_freset(struct device_node *parent, unsigned int *freset)
 {
-	struct device_node *dn;
+	struct device_node *dn = NULL;
 
 	for_each_child_of_node(parent, dn) {
 		if (of_node_to_eeh_dev(dn)) {
@@ -788,7 +788,7 @@ static inline void eeh_restore_one_device_bars(struct
eeh_dev *edev)
  */
 void eeh_restore_bars(struct eeh_dev *edev)
 {
-	struct device_node *dn;
+	struct device_node *dn = NULL;
 	if (!edev)
 		return;
 	
@@ -1050,7 +1050,7 @@ static void eeh_add_device_early(struct device_node
*dn)
  */
 void eeh_add_device_tree_early(struct device_node *dn)
 {
-	struct device_node *sib;
+	struct device_node *sib = NULL;
 
 	for_each_child_of_node(dn, sib)
 		eeh_add_device_tree_early(sib);
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c
b/arch/powerpc/sysdev/mv64x60_dev.c
index 0f6af41..7d4ffd2 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -430,7 +430,7 @@ error:
 
 static int __init mv64x60_device_setup(void)
 {
-	struct device_node *np, *np2;
+	struct device_node *np, *np2 = NULL;
 	struct platform_device *pdev;
 	int id, id2;
 	int err;
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 8f84761..3786bfc 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1327,7 +1327,7 @@ static void fsl_dma_chan_remove(struct fsldma_chan
*chan)
 static int __devinit fsldma_of_probe(struct platform_device *op)
 {
 	struct fsldma_device *fdev;
-	struct device_node *child;
+	struct device_node *child = NULL;
 	int err;
 
 	fdev = kzalloc(sizeof(*fdev), GFP_KERNEL);
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c
b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 7b11edb..33edf87 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -145,7 +145,7 @@ nouveau_connector_of_detect(struct drm_connector
*connector)
 	struct drm_device *dev = connector->dev;
 	struct nouveau_connector *nv_connector =
nouveau_connector(connector);
 	struct nouveau_encoder *nv_encoder;
-	struct device_node *cn, *dn = pci_device_to_OF_node(dev->pdev);
+	struct device_node *cn = NULL, *dn =
pci_device_to_OF_node(dev->pdev);
 
 	if (!dn ||
 	    !((nv_encoder = find_encoder(connector, OUTPUT_TMDS)) ||
diff --git a/drivers/hwmon/ads1015.c b/drivers/hwmon/ads1015.c
index 1958f03..d1ced0d 100644
--- a/drivers/hwmon/ads1015.c
+++ b/drivers/hwmon/ads1015.c
@@ -164,7 +164,7 @@ static int ads1015_remove(struct i2c_client *client)
 static int ads1015_get_channels_config_of(struct i2c_client *client)
 {
 	struct ads1015_data *data = i2c_get_clientdata(client);
-	struct device_node *node;
+	struct device_node *node = NULL;
 
 	if (!client->dev.of_node
 	    || !of_get_next_child(client->dev.of_node, NULL))
diff --git a/drivers/i2c/busses/i2c-powermac.c
b/drivers/i2c/busses/i2c-powermac.c
index 5285f85..60b041b 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -340,7 +340,7 @@ static void __devinit
i2c_powermac_register_devices(struct i2c_adapter *adap,
 						    struct pmac_i2c_bus
*bus)
 {
 	struct i2c_client *newdev;
-	struct device_node *node;
+	struct device_node *node = NULL;
 	bool found_onyx = 0;
 
 	/*
diff --git a/drivers/i2c/busses/i2c-pxa-pci.c
b/drivers/i2c/busses/i2c-pxa-pci.c
index 4dc9bef..ca407d5 100644
--- a/drivers/i2c/busses/i2c-pxa-pci.c
+++ b/drivers/i2c/busses/i2c-pxa-pci.c
@@ -22,7 +22,7 @@ static struct platform_device *add_i2c_device(struct
pci_dev *dev, int bar)
 	struct platform_device *pdev;
 	struct i2c_pxa_platform_data pdata;
 	struct resource res[2];
-	struct device_node *child;
+	struct device_node *child = NULL;
 	static int devnum;
 	int ret;
 
diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index 1038c38..cb632a9 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -132,7 +132,7 @@ struct i2c_adapter *i2c_add_mux_adapter(struct
i2c_adapter *parent,
 	 * nothing if !CONFIG_OF.
 	 */
 	if (mux_dev->of_node) {
-		struct device_node *child;
+		struct device_node *child = NULL;
 		u32 reg;
 
 		for_each_child_of_node(mux_dev->of_node, child) {
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index f61780a..52203d4 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -381,7 +381,7 @@ static int at91_adc_probe_dt(struct at91_adc_state *st,
 {
 	struct iio_dev *idev = iio_priv_to_dev(st);
 	struct device_node *node = pdev->dev.of_node;
-	struct device_node *trig_node;
+	struct device_node *trig_node = NULL;
 	int i = 0, ret;
 	u32 prop;
 
diff --git a/drivers/input/keyboard/samsung-keypad.c
b/drivers/input/keyboard/samsung-keypad.c
index a061ba6..6b3334f 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -255,7 +255,7 @@ static struct samsung_keypad_platdata
*samsung_keypad_parse_dt(
 	struct samsung_keypad_platdata *pdata;
 	struct matrix_keymap_data *keymap_data;
 	uint32_t *keymap, num_rows = 0, num_cols = 0;
-	struct device_node *np = dev->of_node, *key_np;
+	struct device_node *np = dev->of_node, *key_np = NULL;
 	unsigned int key_count = 0;
 
 	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index c032b21..7458663 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -168,7 +168,7 @@ static inline int sizeof_gpio_leds_priv(int num_leds)
 #ifdef CONFIG_OF_GPIO
 static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct
platform_device *pdev)
 {
-	struct device_node *np = pdev->dev.of_node, *child;
+	struct device_node *np = pdev->dev.of_node, *child = NULL;
 	struct gpio_leds_priv *priv;
 	int count = 0, ret;
 
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index 9527b28..ea34f84 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -260,7 +260,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32
*ucc_id)
 static int fsl_pq_mdio_probe(struct platform_device *ofdev)
 {
 	struct device_node *np = ofdev->dev.of_node;
-	struct device_node *tbi;
+	struct device_node *tbi = NULL;
 	struct fsl_pq_mdio_priv *priv;
 	struct fsl_pq_mdio __iomem *regs = NULL;
 	void __iomem *map;
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index 5c12018..cb4ceb6 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -99,7 +99,7 @@ int mdio_mux_init(struct device *dev,
 		  void *data)
 {
 	struct device_node *parent_bus_node;
-	struct device_node *child_bus_node;
+	struct device_node *child_bus_node = NULL;
 	int r, ret_val;
 	struct mii_bus *parent_bus;
 	struct mdio_mux_parent_bus *pb;
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 1e173f3..6a080c7 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -21,7 +21,7 @@
 void of_i2c_register_devices(struct i2c_adapter *adap)
 {
 	void *result;
-	struct device_node *node;
+	struct device_node *node = NULL;
 
 	/* Only register child devices if the adapter has a node pointer set
*/
 	if (!adap->dev.of_node)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 8e6c25f..a52b354 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -33,7 +33,7 @@ MODULE_LICENSE("GPL");
 int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
 {
 	struct phy_device *phy;
-	struct device_node *child;
+	struct device_node *child = NULL;
 	int rc, i;
 
 	/* Mask out all PHYs from auto probing.  Instead the PHYs listed in
diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c
index 13e37e2..dfede93 100644
--- a/drivers/of/of_pci.c
+++ b/drivers/of/of_pci.c
@@ -18,7 +18,7 @@ static inline int __of_pci_pci_compare(struct device_node
*node,
 struct device_node *of_pci_find_child_device(struct device_node *parent,
 					     unsigned int devfn)
 {
-	struct device_node *node, *node2;
+	struct device_node *node = NULL, *node2 = NULL;
 
 	for_each_child_of_node(parent, node) {
 		if (__of_pci_pci_compare(node, devfn))
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index e44f8c2..58e8374 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -344,7 +344,7 @@ static int of_platform_bus_create(struct device_node
*bus,
 				  struct device *parent, bool strict)
 {
 	const struct of_dev_auxdata *auxdata;
-	struct device_node *child;
+	struct device_node *child = NULL;
 	struct platform_device *dev;
 	const char *bus_id = NULL;
 	void *platform_data = NULL;
@@ -396,7 +396,7 @@ int of_platform_bus_probe(struct device_node *root,
 			  const struct of_device_id *matches,
 			  struct device *parent)
 {
-	struct device_node *child;
+	struct device_node *child = NULL;
 	int rc = 0;
 
 	root = root ? of_node_get(root) : of_find_node_by_path("/");
@@ -445,7 +445,7 @@ int of_platform_populate(struct device_node *root,
 			const struct of_dev_auxdata *lookup,
 			struct device *parent)
 {
-	struct device_node *child;
+	struct device_node *child = NULL;
 	int rc = 0;
 
 	root = root ? of_node_get(root) : of_find_node_by_path("/");
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index 44e9726..0f1d0ba 100644
--- a/drivers/pinctrl/pinctrl-imx.c
+++ b/drivers/pinctrl/pinctrl-imx.c
@@ -485,7 +485,7 @@ static int __devinit imx_pinctrl_parse_groups(struct
device_node *np,
 static int __devinit imx_pinctrl_parse_functions(struct device_node *np,
 			struct imx_pinctrl_soc_info *info, u32 index)
 {
-	struct device_node *child;
+	struct device_node *child = NULL;
 	struct imx_pmx_func *func;
 	struct imx_pin_group *grp;
 	int ret;
@@ -521,7 +521,7 @@ static int __devinit imx_pinctrl_probe_dt(struct
platform_device *pdev,
 				struct imx_pinctrl_soc_info *info)
 {
 	struct device_node *np = pdev->dev.of_node;
-	struct device_node *child;
+	struct device_node *child = NULL;
 	int ret;
 	u32 nfuncs = 0;
 	u32 i = 0;
diff --git a/drivers/pinctrl/pinctrl-tegra.c
b/drivers/pinctrl/pinctrl-tegra.c
index ae52e4e..253d338 100644
--- a/drivers/pinctrl/pinctrl-tegra.c
+++ b/drivers/pinctrl/pinctrl-tegra.c
@@ -295,7 +295,7 @@ int tegra_pinctrl_dt_node_to_map(struct pinctrl_dev
*pctldev,
 				 struct pinctrl_map **map, unsigned
*num_maps)
 {
 	unsigned reserved_maps;
-	struct device_node *np;
+	struct device_node *np = NULL;
 	int ret;
 
 	reserved_maps = 0;
diff --git a/drivers/pinctrl/spear/pinctrl-spear.c
b/drivers/pinctrl/spear/pinctrl-spear.c
index 5d4f44f..ca7a6df 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.c
+++ b/drivers/pinctrl/spear/pinctrl-spear.c
@@ -126,7 +126,7 @@ int spear_pinctrl_dt_node_to_map(struct pinctrl_dev
*pctldev,
 				 struct pinctrl_map **map, unsigned
*num_maps)
 {
 	struct spear_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
-	struct device_node *np;
+	struct device_node *np = NULL;
 	struct property *prop;
 	const char *function, *group;
 	int ret, index = 0, count = 0;
diff --git a/drivers/regulator/da9052-regulator.c
b/drivers/regulator/da9052-regulator.c
index 903299c..ce3aa94 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -396,7 +396,7 @@ static int __devinit da9052_regulator_probe(struct
platform_device *pdev)
 	} else {
 #ifdef CONFIG_OF
 		struct device_node *nproot = da9052->dev->of_node;
-		struct device_node *np;
+		struct device_node *np = NULL;
 
 		if (!nproot)
 			return -ENODEV;
diff --git a/drivers/regulator/mc13xxx-regulator-core.c
b/drivers/regulator/mc13xxx-regulator-core.c
index d6eda28..d179f54 100644
--- a/drivers/regulator/mc13xxx-regulator-core.c
+++ b/drivers/regulator/mc13xxx-regulator-core.c
@@ -173,7 +173,7 @@ EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_ops);
 #ifdef CONFIG_OF
 int __devinit mc13xxx_get_num_regulators_dt(struct platform_device *pdev)
 {
-	struct device_node *parent, *child;
+	struct device_node *parent, *child = NULL;
 	int num = 0;
 
 	of_node_get(pdev->dev.parent->of_node);
diff --git a/drivers/regulator/of_regulator.c
b/drivers/regulator/of_regulator.c
index 3e4106f..62f59814 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -113,7 +113,7 @@ int of_regulator_match(struct device *dev, struct
device_node *node,
 	unsigned int count = 0;
 	unsigned int i;
 	const char *regulator_comp;
-	struct device_node *child;
+	struct device_node *child = NULL;
 
 	if (!dev || !node)
 		return -EINVAL;
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 84c2861..81f20cf 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -811,7 +811,7 @@ err_init_queue:
 static void of_register_spi_devices(struct spi_master *master)
 {
 	struct spi_device *spi;
-	struct device_node *nc;
+	struct device_node *nc = NULL;
 	const __be32 *prop;
 	int rc;
 	int len;
diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
index 0d2ea0c..07f308e 100644
--- a/drivers/tty/hvc/hvc_opal.c
+++ b/drivers/tty/hvc/hvc_opal.c
@@ -344,7 +344,7 @@ void __init hvc_opal_init_early(void)
 			return;
 		}
 	} else {
-		struct device_node *opal, *np;
+		struct device_node *opal, *np = NULL;
 
 		/* Current OPAL takeover doesn't provide the stdout
 		 * path, so we hard wire it
-- 
1.7.4.1



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

* RE: [PATCH 05/11] ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
  2012-08-08 14:47 ` [PATCH 05/11] ARM: exynos: exynos_pm_add_dev_to_genpd may be unused Arnd Bergmann
@ 2012-08-10  6:48   ` Kukjin Kim
  2012-08-10  6:57   ` Thomas Abraham
  1 sibling, 0 replies; 35+ messages in thread
From: Kukjin Kim @ 2012-08-10  6:48 UTC (permalink / raw)
  To: 'Arnd Bergmann', linux-arm-kernel
  Cc: arm, linux-kernel, 'Thomas Abraham', 'Rafael J. Wysocki'

Arnd Bergmann wrote:
> 
> exynos_pm_add_dev_to_genpd is used if one or more out of a large
> number of Kconfig symbols are enabled. However the new
> exynos_defconfig selects none of those, so the function becomes
> unused. Marking it so lets the compiler automatically discard
> it.
> 
> Without this patch, building exynos_defconfig results in:
> 
> arch/arm/mach-exynos/pm_domains.c:118:123: warning:
> 'exynos_pm_add_dev_to_genpd' defined but not used [-Wunused-function]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Thomas Abraham <thomas.abraham@linaro.org>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Kukjin Kim <kgene.kim@samsung.com>

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


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

* Re: [PATCH 05/11] ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
  2012-08-08 14:47 ` [PATCH 05/11] ARM: exynos: exynos_pm_add_dev_to_genpd may be unused Arnd Bergmann
  2012-08-10  6:48   ` Kukjin Kim
@ 2012-08-10  6:57   ` Thomas Abraham
  1 sibling, 0 replies; 35+ messages in thread
From: Thomas Abraham @ 2012-08-10  6:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, arm, linux-kernel, Rafael J. Wysocki, Kukjin Kim

On 8 August 2012 20:17, Arnd Bergmann <arnd@arndb.de> wrote:
> exynos_pm_add_dev_to_genpd is used if one or more out of a large
> number of Kconfig symbols are enabled. However the new
> exynos_defconfig selects none of those, so the function becomes
> unused. Marking it so lets the compiler automatically discard
> it.
>
> Without this patch, building exynos_defconfig results in:
>
> arch/arm/mach-exynos/pm_domains.c:118:123: warning: 'exynos_pm_add_dev_to_genpd' defined but not used [-Wunused-function]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Thomas Abraham <thomas.abraham@linaro.org>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> ---
>  arch/arm/mach-exynos/pm_domains.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
> index 373c3c0..c0bc83a 100644
> --- a/arch/arm/mach-exynos/pm_domains.c
> +++ b/arch/arm/mach-exynos/pm_domains.c
> @@ -115,7 +115,7 @@ static __init int exynos_pm_dt_parse_domains(void)
>  }
>  #endif /* CONFIG_OF */
>
> -static __init void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
> +static __init __maybe_unused void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
>                                                 struct exynos_pm_domain *pd)
>  {
>         if (pdev->dev.bus) {
> --
> 1.7.10
>

Acked-by: Thomas Abraham <thomas.abraham@linaro.org>

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

* Re: [PATCH 10/11] spi/s3c64xx: improve error handling
  2012-08-08 14:47 ` [PATCH 10/11] spi/s3c64xx: improve error handling Arnd Bergmann
  2012-08-10  6:39   ` Kukjin Kim
@ 2012-08-10  6:58   ` Thomas Abraham
  1 sibling, 0 replies; 35+ messages in thread
From: Thomas Abraham @ 2012-08-10  6:58 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, arm, linux-kernel, Jaswinder Singh,
	Grant Likely, Kukjin Kim

On 8 August 2012 20:17, Arnd Bergmann <arnd@arndb.de> wrote:
> When a device tree definition os an s3c64xx SPI master is missing
> a "controller-data" subnode, the newly added s3c64xx_get_slave_ctrldata
> function might use uninitialized memory in place of that node,
> which was correctly reported by gcc.
>
> Without this patch, building s3c6400_defconfig results in:
>
> drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata.isra.25':
> drivers/spi/spi-s3c64xx.c:841:5: warning: 'data_np' may be used uninitialized in this function [-Wuninitialized]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Thomas Abraham <thomas.abraham@linaro.org>
> Cc: Jaswinder Singh <jaswinder.singh@linaro.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> ---
>  drivers/spi/spi-s3c64xx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 646a765..cfa2c35 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -826,7 +826,7 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
>                                 struct spi_device *spi)
>  {
>         struct s3c64xx_spi_csinfo *cs;
> -       struct device_node *slave_np, *data_np;
> +       struct device_node *slave_np, *data_np = NULL;
>         u32 fb_delay = 0;
>
>         slave_np = spi->dev.of_node;
> --
> 1.7.10
>

Acked-by: Thomas Abraham <thomas.abraham@linaro.org>

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

* Re: [PATCH 10/11] spi/s3c64xx: improve error handling
  2012-08-10  6:39   ` Kukjin Kim
@ 2012-08-10  7:34     ` Arnd Bergmann
  0 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-10  7:34 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: linux-arm-kernel, arm, linux-kernel, 'Thomas Abraham',
	'Jaswinder Singh', 'Grant Likely'

On Friday 10 August 2012, Kukjin Kim wrote:

> BTW for same reason, probably, we need following fix?
> 
>  arch/arm/mach-tegra/tegra2_emc.c             |    4 ++--
>  arch/c6x/kernel/setup.c                      |    2 +-
>  arch/powerpc/kernel/ibmebus.c                |    2 +-
>  arch/powerpc/kernel/pci_of_scan.c            |    2 +-
>  arch/powerpc/kernel/prom.c                   |    2 +-
>  arch/powerpc/kernel/rtas_pci.c               |    2 +-
>  arch/powerpc/kernel/vio.c                    |    2 +-
>  arch/powerpc/platforms/44x/warp.c            |    2 +-
> ...

Actually not. The difference is that only s3c64xx_get_slave_ctrldata
accesses the node pointer outside of the look (after break).
This fails when there are no child nodes at all. In the other
cases, the only use of the node pointer is inside the loop,
where it is guaranteed to be valid.

	Arnd

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

* Re: [PATCH 06/11] gpio: em: do not discard em_gio_irq_domain_cleanup
  2012-08-08 14:47 ` [PATCH 06/11] gpio: em: do not discard em_gio_irq_domain_cleanup Arnd Bergmann
@ 2012-08-10 10:59   ` Linus Walleij
  2012-08-10 11:33     ` Arnd Bergmann
  0 siblings, 1 reply; 35+ messages in thread
From: Linus Walleij @ 2012-08-10 10:59 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, arm, linux-kernel, Magnus Damm, Rafael J. Wysocki

On Wed, Aug 8, 2012 at 4:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> The newly added gpio-em driver marks its em_gio_irq_domain_cleanup
> function as __devexit, which would lead to that function being
> discarded in case CONFIG_HOTPLUG is disabled. However, the function
> is also called by the error handling logic em_gio_probe, which
> would cause a jump into a NULL pointer if it was removed from the
> kernel or module.

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Will you push this through the ARM SoC tree or do you want me
to apply it to my GPIO tree?

Yours,
Linus Walleij

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

* Re: [PATCH 06/11] gpio: em: do not discard em_gio_irq_domain_cleanup
  2012-08-10 10:59   ` Linus Walleij
@ 2012-08-10 11:33     ` Arnd Bergmann
  0 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2012-08-10 11:33 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-arm-kernel, arm, linux-kernel, Magnus Damm, Rafael J. Wysocki

On Friday 10 August 2012, Linus Walleij wrote:
> On Wed, Aug 8, 2012 at 4:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > The newly added gpio-em driver marks its em_gio_irq_domain_cleanup
> > function as __devexit, which would lead to that function being
> > discarded in case CONFIG_HOTPLUG is disabled. However, the function
> > is also called by the error handling logic em_gio_probe, which
> > would cause a jump into a NULL pointer if it was removed from the
> > kernel or module.
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Will you push this through the ARM SoC tree or do you want me
> to apply it to my GPIO tree?

I'm about to send out the whole series to Torvalds, so I'll just
keep it in now.

	Arnd

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

* Re: [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS
  2012-08-08 17:26         ` Arnd Bergmann
  2012-08-08 19:25           ` Rafael J. Wysocki
@ 2012-08-20  8:32           ` Herbert Xu
  1 sibling, 0 replies; 35+ messages in thread
From: Herbert Xu @ 2012-08-20  8:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Takashi Iwai, Stephen Warren, linux-arm-kernel, arm,
	linux-kernel, Rafael J. Wysocki, Laxman Dewangan

On Wed, Aug 08, 2012 at 05:26:21PM +0000, Arnd Bergmann wrote:
> 
> Ok. this leaves the omap-rng driver, and my patch comes down to the below.
> Thanks!

Patch applied.  Thanks Arnd.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2012-08-20  8:33 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1344437248-20560-1-git-send-email-arnd@arndb.de>
2012-08-08 14:47 ` [PATCH 01/11] ARM: topology: mark init_cpu_topology as __init Arnd Bergmann
2012-08-08 17:53   ` Stephen Boyd
2012-08-08 19:14     ` Arnd Bergmann
2012-08-08 14:47 ` [PATCH 02/11] mfd/asic3: fix asic3_mfd_probe return value Arnd Bergmann
2012-08-08 14:47 ` [PATCH 03/11] usb/ohci-omap: remove unused variable Arnd Bergmann
2012-08-08 15:25   ` Greg Kroah-Hartman
2012-08-08 15:34   ` Alan Stern
2012-08-08 14:47 ` [PATCH 04/11] ARM: ux500: really kill snowball_of_platform_devs Arnd Bergmann
2012-08-08 16:22   ` Lee Jones
2012-08-08 17:19     ` Arnd Bergmann
2012-08-08 14:47 ` [PATCH 05/11] ARM: exynos: exynos_pm_add_dev_to_genpd may be unused Arnd Bergmann
2012-08-10  6:48   ` Kukjin Kim
2012-08-10  6:57   ` Thomas Abraham
2012-08-08 14:47 ` [PATCH 06/11] gpio: em: do not discard em_gio_irq_domain_cleanup Arnd Bergmann
2012-08-10 10:59   ` Linus Walleij
2012-08-10 11:33     ` Arnd Bergmann
2012-08-08 14:47 ` [PATCH 07/11] net/stmmac: mark probe function as __devinit Arnd Bergmann
2012-08-08 15:07   ` Stefan Roese
2012-08-08 23:08   ` David Miller
2012-08-08 14:47 ` [PATCH 08/11] mtd/omap2: fix dmaengine_slave_config error handling Arnd Bergmann
2012-08-08 14:47 ` [PATCH 09/11] regulator/twl: remove fixed resource handling Arnd Bergmann
2012-08-08 14:50   ` Mark Brown
2012-08-08 15:06     ` Arnd Bergmann
2012-08-08 14:47 ` [PATCH 10/11] spi/s3c64xx: improve error handling Arnd Bergmann
2012-08-10  6:39   ` Kukjin Kim
2012-08-10  7:34     ` Arnd Bergmann
2012-08-10  6:58   ` Thomas Abraham
2012-08-08 14:47 ` [PATCH 11/11] pm/drivers: fix use of SIMPLE_DEV_PM_OPS Arnd Bergmann
2012-08-08 15:40   ` Stephen Warren
2012-08-08 16:22     ` Arnd Bergmann
2012-08-08 16:43       ` Takashi Iwai
2012-08-08 17:26         ` Arnd Bergmann
2012-08-08 19:25           ` Rafael J. Wysocki
2012-08-20  8:32           ` Herbert Xu
2012-08-08 18:11   ` Kevin Hilman

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