Skip to contentSkip to conversation

ARM: imx: fix imx31-dt.c time-related warning

PATCH New Stephen Warren 3 participants 5 messages Jan 30, 2013 – Feb 1, 2013

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

PATCH 1/1 ARM: imx: fix imx31-dt.c time-related warning

From: Stephen Warren <[email protected]>

Commit 6bb27d7 "ARM: delete struct sys_timer" caused the following:

arch/arm/mach-imx/imx31-dt.c:56:2: warning: initialization from incompatible pointer type [enabled by default] arch/arm/mach-imx/imx31-dt.c:56:2: warning: (near initialization for ?__mach_desc_IMX31_DT.init_time?) [enabled by default]

This is because mx31_clocks_init_dt() returns int, whereas the .init_time field prototype expects a function returning void. Implement a wrapper so that the prototypes match.

---
This patch is based on arm-soc's timer/cleanup branch, which contains the commit mentioned above.

---
 arch/arm/mach-imx/imx31-dt.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-imx/imx31-dt.c +6 -1
index f9a6909..b5c04ee 100644
@@ -43,12 +43,17 @@ static const char *imx31_dt_board_compat[] __initdata = {
 	NULL
 };
 
+static void __init imx31_dt_timer_init(void)
+{
+	mx31_clocks_init_dt();
+}
+
 DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)")
 	.map_io		= mx31_map_io,
 	.init_early	= imx31_init_early,
 	.init_irq	= mx31_init_irq,
 	.handle_irq	= imx31_handle_irq,
-	.init_time	= mx31_clocks_init_dt,
+	.init_time	= imx31_dt_timer_init,
 	.init_machine	= imx31_dt_init,
 	.dt_compat	= imx31_dt_board_compat,
 	.restart	= mxc_restart,
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 ARM: imx: fix imx31-dt.c time-related warning

Quoted 7 lines · Stephen Warren

From: Stephen Warren <[email protected]>

Commit 6bb27d7 "ARM: delete struct sys_timer" caused the following:

arch/arm/mach-imx/imx31-dt.c:56:2: warning: initialization from incompatible pointer type [enabled by default] arch/arm/mach-imx/imx31-dt.c:56:2: warning: (near initialization for ?__mach_desc_IMX31_DT.init_time?) [enabled by default]

Quoted 6 lines

This is because mx31_clocks_init_dt() returns int, whereas the .init_time field prototype expects a function returning void. Implement a wrapper so that the prototypes match.

Quoted 3 lines

---
This patch is based on arm-soc's timer/cleanup branch, which contains the commit mentioned above.

I suppose that it should just be applied by arm-soc folks on that branch, right?

Shawn

#2 lore raw

PATCH 1/1 ARM: imx: fix imx31-dt.c time-related warning

Quoted 15 lines · Shawn Guo
Quoted 7 lines · Stephen Warren

From: Stephen Warren <[email protected]>

Commit 6bb27d7 "ARM: delete struct sys_timer" caused the following:

arch/arm/mach-imx/imx31-dt.c:56:2: warning: initialization from incompatible pointer type [enabled by default] arch/arm/mach-imx/imx31-dt.c:56:2: warning: (near initialization for ?__mach_desc_IMX31_DT.init_time?) [enabled by default]

Quoted 6 lines

This is because mx31_clocks_init_dt() returns int, whereas the .init_time field prototype expects a function returning void. Implement a wrapper so that the prototypes match.

Quoted 8 lines
Quoted 3 lines

---
This patch is based on arm-soc's timer/cleanup branch, which contains the commit mentioned above.

I suppose that it should just be applied by arm-soc folks on that branch, right?

I wasn't sure if the IMX maintainers had any branch based on the timer/cleanup branch already. On the off-chance you did, I sent the patch to you. If you don't, I can resend to the arm-soc maintainers.

#3 lore raw

PATCH 1/1 ARM: imx: fix imx31-dt.c time-related warning

Quoted 3 lines · Stephen Warren

I wasn't sure if the IMX maintainers had any branch based on the timer/cleanup branch already. On the off-chance you did, I sent the patch to you. If you don't, I can resend to the arm-soc maintainers.

I do not.

Shawn

#4 lore raw

PATCH 1/1 ARM: imx: fix imx31-dt.c time-related warning

In reply to Stephen Warren
Quoted 11 lines · Stephen Warren

From: Stephen Warren <[email protected]>

Commit 6bb27d7 "ARM: delete struct sys_timer" caused the following:

arch/arm/mach-imx/imx31-dt.c:56:2: warning: initialization from incompatible pointer type [enabled by default] arch/arm/mach-imx/imx31-dt.c:56:2: warning: (near initialization for ?__mach_desc_IMX31_DT.init_time?) [enabled by default]

This is because mx31_clocks_init_dt() returns int, whereas the .init_time field prototype expects a function returning void. Implement a wrapper so that the prototypes match.

Quoted 5 lines

---
This patch is based on arm-soc's timer/cleanup branch, which contains the commit mentioned above.

Applied.

-Olof