Skip to contentSkip to conversation

ARM: mach-omap2: gpmc: Fix warning when CONFIG_ARM_LPAE=y

PATCH New Fabio Estevam 3 participants 3 messages Aug 22, 2013 – Sep 17, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mach-omap2: gpmc: Fix warning when CONFIG_ARM_LPAE=y

From: Fabio Estevam <[email protected]>

When CONFIG_ARM_LPAE=y the following build warning is generated:

arch/arm/mach-omap2/gpmc.c:1495:4: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat]

According to Documentation/printk-formats.txt '%pa' can be used to properly print 'resource_size_t'.

---
 arch/arm/mach-omap2/gpmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/gpmc.c +2 -2
index f3fdd6a..ad6da1d 100644
@@ -1491,8 +1491,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
 	 */
 	ret = gpmc_cs_remap(cs, res.start);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%x\n",
-			cs, res.start);
+		dev_err(&pdev->dev, "cannot remap GPMC CS %d to %pa\n",
+			cs, &res.start);
 		goto err;
 	}
 
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 ARM: mach-omap2: gpmc: Fix warning when CONFIG_ARM_LPAE=y

Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

When CONFIG_ARM_LPAE=y the following build warning is generated:

arch/arm/mach-omap2/gpmc.c:1495:4: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat]

According to Documentation/printk-formats.txt '%pa' can be used to properly print 'resource_size_t'.

Quoted 18 lines
---
 arch/arm/mach-omap2/gpmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/gpmc.c +2 -2
index f3fdd6a..ad6da1d 100644
@@ -1491,8 +1491,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
 	 */
 	ret = gpmc_cs_remap(cs, res.start);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%x\n",
-			cs, res.start);
+		dev_err(&pdev->dev, "cannot remap GPMC CS %d to %pa\n",
+			cs, &res.start);
 		goto err;
 	}
maintainer
#2 lore raw

PATCH 1/1 ARM: mach-omap2: gpmc: Fix warning when CONFIG_ARM_LPAE=y

Quoted 8 lines · Kevin Hilman
Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

When CONFIG_ARM_LPAE=y the following build warning is generated:

arch/arm/mach-omap2/gpmc.c:1495:4: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat]

Quoted 7 lines
Quoted 5 lines

According to Documentation/printk-formats.txt '%pa' can be used to properly print 'resource_size_t'.

Thanks applying into omap-for-v3.12/fixes.

Tony

Quoted 18 lines
Quoted 18 lines
---
 arch/arm/mach-omap2/gpmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/gpmc.c +2 -2
index f3fdd6a..ad6da1d 100644
@@ -1491,8 +1491,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
 	 */
 	ret = gpmc_cs_remap(cs, res.start);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%x\n",
-			cs, res.start);
+		dev_err(&pdev->dev, "cannot remap GPMC CS %d to %pa\n",
+			cs, &res.start);
 		goto err;
 	}