* [PATCH 3.0-rc1] OMAP: fix compilation error
@ 2011-05-30 21:44 Janusz Krzysztofik
2011-05-30 22:21 ` Russell King - ARM Linux
0 siblings, 1 reply; 4+ messages in thread
From: Janusz Krzysztofik @ 2011-05-30 21:44 UTC (permalink / raw)
To: linux-omap@vger.kernel.org; +Cc: Tony Lindgren, linux-arm-kernel
Include <linux/platform_device.h> from
arch/arm/plat-omap/include/plat/flash.h, otherwise compilation may break
with:
In file included from arch/arm/mach-omap1/flash.c:15:
arch/arm/plat-omap/include/plat/flash.h:14: warning: 'struct platform_device' declared inside parameter list
arch/arm/plat-omap/include/plat/flash.h:14: warning: its scope is only this definition or declaration, which is probably not what you want
arch/arm/mach-omap1/flash.c:16: warning: 'struct platform_device' declared inside parameter list
arch/arm/mach-omap1/flash.c:17: error: conflicting types for 'omap1_set_vpp'
arch/arm/plat-omap/include/plat/flash.h:14: error: previous declaration of 'omap1_set_vpp' was here
Detected and corrected while building for Amstrad Delta, confirmed with
omap1_defconfig.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
arch/arm/plat-omap/include/plat/flash.h | 1 +
1 file changed, 1 insertion(+)
--- git/arch/arm/plat-omap/include/plat/flash.h.orig 2011-05-30 22:15:54.000000000 +0200
+++ git/arch/arm/plat-omap/include/plat/flash.h 2011-05-30 22:38:15.000000000 +0200
@@ -10,6 +10,7 @@
#define __OMAP_FLASH_H
#include <linux/mtd/map.h>
+#include <linux/platform_device.h>
extern void omap1_set_vpp(struct platform_device *pdev, int enable);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3.0-rc1] OMAP: fix compilation error
2011-05-30 21:44 [PATCH 3.0-rc1] OMAP: fix compilation error Janusz Krzysztofik
@ 2011-05-30 22:21 ` Russell King - ARM Linux
2011-05-30 22:44 ` [PATCH 3.0-rc1 v2] " Janusz Krzysztofik
0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2011-05-30 22:21 UTC (permalink / raw)
To: Janusz Krzysztofik
Cc: linux-omap@vger.kernel.org, Tony Lindgren, linux-arm-kernel
On Mon, May 30, 2011 at 11:44:01PM +0200, Janusz Krzysztofik wrote:
> Include <linux/platform_device.h> from
> arch/arm/plat-omap/include/plat/flash.h, otherwise compilation may break
> with:
>
> In file included from arch/arm/mach-omap1/flash.c:15:
> arch/arm/plat-omap/include/plat/flash.h:14: warning: 'struct platform_device' declared inside parameter list
> arch/arm/plat-omap/include/plat/flash.h:14: warning: its scope is only this definition or declaration, which is probably not what you want
> arch/arm/mach-omap1/flash.c:16: warning: 'struct platform_device' declared inside parameter list
> arch/arm/mach-omap1/flash.c:17: error: conflicting types for 'omap1_set_vpp'
> arch/arm/plat-omap/include/plat/flash.h:14: error: previous declaration of 'omap1_set_vpp' was here
Just forward-declare the struct by adding:
struct platform_device;
in this header; there's no need to add to the complexities of header file
inclusion...
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3.0-rc1 v2] OMAP: fix compilation error
2011-05-30 22:21 ` Russell King - ARM Linux
@ 2011-05-30 22:44 ` Janusz Krzysztofik
2011-05-31 6:41 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Janusz Krzysztofik @ 2011-05-30 22:44 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: linux-omap@vger.kernel.org, Tony Lindgren, linux-arm-kernel
Forward-declare platform_device structure in
arch/arm/plat-omap/include/plat/flash.h, otherwise compilation may break
with:
In file included from arch/arm/mach-omap1/flash.c:15:
arch/arm/plat-omap/include/plat/flash.h:14: warning: 'struct platform_device' declared inside parameter list
arch/arm/plat-omap/include/plat/flash.h:14: warning: its scope is only this definition or declaration, which is probably not what you want
arch/arm/mach-omap1/flash.c:16: warning: 'struct platform_device' declared inside parameter list
arch/arm/mach-omap1/flash.c:17: error: conflicting types for 'omap1_set_vpp'
arch/arm/plat-omap/include/plat/flash.h:14: error: previous declaration of 'omap1_set_vpp' was here
Detected and corrected while building for Amstrad Delta, confirmed with
omap1_defconfig.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
v1 -> v2 change requested by Russell King (thanks!):
- no need to add to the complexities of header file inclusion
arch/arm/plat-omap/include/plat/flash.h | 1 +
1 file changed, 1 insertion(+)
--- git/arch/arm/plat-omap/include/plat/flash.h.orig 2011-05-31 00:29:36.000000000 +0200
+++ git/arch/arm/plat-omap/include/plat/flash.h 2011-05-31 00:30:50.000000000 +0200
@@ -11,6 +11,7 @@
#include <linux/mtd/map.h>
+struct platform_device;
extern void omap1_set_vpp(struct platform_device *pdev, int enable);
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3.0-rc1 v2] OMAP: fix compilation error
2011-05-30 22:44 ` [PATCH 3.0-rc1 v2] " Janusz Krzysztofik
@ 2011-05-31 6:41 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2011-05-31 6:41 UTC (permalink / raw)
To: Janusz Krzysztofik
Cc: Russell King - ARM Linux, linux-omap@vger.kernel.org,
linux-arm-kernel
* Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [110530 15:43]:
>
> Detected and corrected while building for Amstrad Delta, confirmed with
> omap1_defconfig.
Thanks, will queue this fix.
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-31 6:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-30 21:44 [PATCH 3.0-rc1] OMAP: fix compilation error Janusz Krzysztofik
2011-05-30 22:21 ` Russell King - ARM Linux
2011-05-30 22:44 ` [PATCH 3.0-rc1 v2] " Janusz Krzysztofik
2011-05-31 6:41 ` Tony Lindgren
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).