Skip to contentSkip to conversation

ARM: ep93xx: Fix build error due to 'SZ_32M' undeclared

PATCH Applied Axel Lin 2 participants 4 messages Sep 3, 2012 – Sep 7, 2012

Subsystems (4)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ARM: ep93xx: Fix build error due to 'SZ_32M' undeclared

Include linux/sizes.h to fix below build errors:

CC arch/arm/mach-ep93xx/adssphere.o
arch/arm/mach-ep93xx/adssphere.c: In function 'adssphere_init_machine':
arch/arm/mach-ep93xx/adssphere.c:32:49: error: 'SZ_32M' undeclared (first use in this function) arch/arm/mach-ep93xx/adssphere.c:32:49: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/mach-ep93xx/adssphere.o] Error 1
make: *** [arch/arm/mach-ep93xx] Error 2

CC arch/arm/mach-ep93xx/gesbc9312.o
arch/arm/mach-ep93xx/gesbc9312.c: In function 'gesbc9312_init_machine':
arch/arm/mach-ep93xx/gesbc9312.c:32:49: error: 'SZ_8M' undeclared (first use in this function) arch/arm/mach-ep93xx/gesbc9312.c:32:49: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/mach-ep93xx/gesbc9312.o] Error 1
make: *** [arch/arm/mach-ep93xx] Error 2

---
This patch is against linux-next tree.
Axel

 arch/arm/mach-ep93xx/adssphere.c |    1 +
 arch/arm/mach-ep93xx/gesbc9312.c |    1 +
 2 files changed, 2 insertions(+)
arch/arm/mach-ep93xx/adssphere.c +1 -0
index a472777..41383bf 100644
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/sizes.h>
 
 #include <mach/hardware.h>
 
arch/arm/mach-ep93xx/gesbc9312.c +1 -0
index 437c341..7fd705b 100644
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/sizes.h>
 
 #include <mach/hardware.h>
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 9 lines · Axel Lin

Include linux/sizes.h to fix below build errors:

CC arch/arm/mach-ep93xx/adssphere.o
arch/arm/mach-ep93xx/adssphere.c: In function 'adssphere_init_machine':
arch/arm/mach-ep93xx/adssphere.c:32:49: error: 'SZ_32M' undeclared (first use in this function) arch/arm/mach-ep93xx/adssphere.c:32:49: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/mach-ep93xx/adssphere.o] Error 1
make: *** [arch/arm/mach-ep93xx] Error 2

Quoted 8 lines

CC arch/arm/mach-ep93xx/gesbc9312.o
arch/arm/mach-ep93xx/gesbc9312.c: In function 'gesbc9312_init_machine':
arch/arm/mach-ep93xx/gesbc9312.c:32:49: error: 'SZ_8M' undeclared (first use in this function) arch/arm/mach-ep93xx/gesbc9312.c:32:49: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/mach-ep93xx/gesbc9312.o] Error 1
make: *** [arch/arm/mach-ep93xx] Error 2

Hi Axel,

The patch looks fine. I notice that the other ep93xx boards are also using the SZ_ defines, but are indirectly including linux/sizes.h via asm/memory.h, which in turn is indirectly included via asm/io.h. That seems a bit flaky, so I wonder if we should just explicitly include <linux/sizes.h> in all the board files which use the SZ_ macros as per the patch below. Thoughts?

~Ryan

---
ARM: ep93xx: Fix build error due to 'SZ_32M' undeclared

Include linux/sizes.h to fix below build errors:

CC arch/arm/mach-ep93xx/adssphere.o
arch/arm/mach-ep93xx/adssphere.c: In function 'adssphere_init_machine':
arch/arm/mach-ep93xx/adssphere.c:32:49: error: 'SZ_32M' undeclared (first use in this function) arch/arm/mach-ep93xx/adssphere.c:32:49: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/mach-ep93xx/adssphere.o] Error 1
make: *** [arch/arm/mach-ep93xx] Error 2

CC arch/arm/mach-ep93xx/gesbc9312.o
arch/arm/mach-ep93xx/gesbc9312.c: In function 'gesbc9312_init_machine':
arch/arm/mach-ep93xx/gesbc9312.c:32:49: error: 'SZ_8M' undeclared (first use in this function) arch/arm/mach-ep93xx/gesbc9312.c:32:49: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/arm/mach-ep93xx/gesbc9312.o] Error 1
make: *** [arch/arm/mach-ep93xx] Error 2

Also explicitly include linux/sizes.h on the other ep93xx which use the SZ_ macros and are currently indirectly including linux/sizes.h via asm/memory.h, which is included via asm/io.h.

arch/arm/mach-ep93xx/adssphere.c +1 -0
index a472777..41383bf 100644
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/sizes.h>
 
 #include <mach/hardware.h>
 
arch/arm/mach-ep93xx/edb93xx.c +1 -0
index 337ab7c..e34f257 100644
@@ -31,6 +31,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
 #include <linux/spi/spi.h>
+#include <linux/sizes.h>
 
 #include <sound/cs4271.h>
 
arch/arm/mach-ep93xx/gesbc9312.c +1 -0
index 437c341..7fd705b 100644
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/sizes.h>
 
 #include <mach/hardware.h>
 
arch/arm/mach-ep93xx/micro9.c +1 -0
index 3d7cdab..1a8f032 100644
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
+#include <linux/sizes.h>
 
 #include <mach/hardware.h>
 
arch/arm/mach-ep93xx/simone.c +1 -0
index 33dc079..a7c84cf 100644
@@ -20,6 +20,7 @@
 #include <linux/platform_device.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
+#include <linux/sizes.h>
 
 #include <mach/hardware.h>
 #include <mach/fb.h>
arch/arm/mach-ep93xx/snappercl15.c +1 -0
index 01abd35..55acc79 100644
@@ -23,6 +23,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
 #include <linux/fb.h>
+#include <linux/sizes.h>
 
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/nand.h>
arch/arm/mach-ep93xx/ts72xx.c +1 -0
index aefda11..2a621af 100644
@@ -19,6 +19,7 @@
 #include <linux/m48t86.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/sizes.h>
 
 #include <mach/hardware.h>
 #include <mach/ts72xx.h>
arch/arm/mach-ep93xx/vision_ep9307.c +1 -0
index 2905a49..4630a97 100644
@@ -28,6 +28,7 @@
 #include <linux/spi/flash.h>
 #include <linux/spi/mmc_spi.h>
 #include <linux/mmc/host.h>
+#include <linux/sizes.h>
 
 #include <mach/hardware.h>
 #include <mach/fb.h>
author
#2 lore raw
Quoted 5 lines

Hi Axel,

The patch looks fine. I notice that the other ep93xx boards are also using the SZ_ defines, but are indirectly including linux/sizes.h via asm/memory.h, which in turn is indirectly included via asm/io.h. That

Seems this is also true for other platforms ( e.g. mach-pxa, mach-ux500, etc)

Quoted 3 lines

seems a bit flaky, so I wonder if we should just explicitly include <linux/sizes.h> in all the board files which use the SZ_ macros as per the patch below. Thoughts?

I'm 50/50 on this.
But if we do these changes, this patch is more than a build fix.

Regards,
Axel

Applied
#3 lore raw
Quoted 5 lines · Axel Lin
Quoted 5 lines

Hi Axel,

The patch looks fine. I notice that the other ep93xx boards are also using the SZ_ defines, but are indirectly including linux/sizes.h via asm/memory.h, which in turn is indirectly included via asm/io.h. That

Quoted 7 lines

Seems this is also true for other platforms ( e.g. mach-pxa, mach-ux500, etc)

Quoted 3 lines

seems a bit flaky, so I wonder if we should just explicitly include <linux/sizes.h> in all the board files which use the SZ_ macros as per the patch below. Thoughts?

I'm 50/50 on this.
But if we do these changes, this patch is more than a build fix.

Fair enough,

I've applied your patch as-is to my ep93xx-fixes branch.

Thanks,
~Ryan