diff mbox

[1/2] ARM: imx: Remove unneeded .map_io initialization

Message ID 1415980438-12939-1-git-send-email-geert+renesas@glider.be
State New
Headers show

Commit Message

Geert Uytterhoeven Nov. 14, 2014, 3:53 p.m. UTC
If machine_desc.map_io is not set, devicemaps_init() in the common ARM
code will call debug_ll_io_init().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested

 arch/arm/mach-imx/mach-imx6sl.c | 1 -
 arch/arm/mach-imx/mach-imx6sx.c | 1 -
 2 files changed, 2 deletions(-)

Comments

Russell King - ARM Linux Nov. 14, 2014, 4:02 p.m. UTC | #1
On Fri, Nov 14, 2014 at 04:53:57PM +0100, Geert Uytterhoeven wrote:
> If machine_desc.map_io is not set, devicemaps_init() in the common ARM
> code will call debug_ll_io_init().

How about a WARN_ON(mdesc->map_io == debug_ll_io_init) ?  This can only
really be done when CONFIG_DEBUG_LL is defined because otherwise it's an
inline function, but it may help to stop these from appearing in the
first place.
Shawn Guo Nov. 19, 2014, 2:17 a.m. UTC | #2
On Fri, Nov 14, 2014 at 04:53:57PM +0100, Geert Uytterhoeven wrote:
> If machine_desc.map_io is not set, devicemaps_init() in the common ARM
> code will call debug_ll_io_init().
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Applied, thanks.
Geert Uytterhoeven Nov. 19, 2014, 1:17 p.m. UTC | #3
On Fri, Nov 14, 2014 at 5:02 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Fri, Nov 14, 2014 at 04:53:57PM +0100, Geert Uytterhoeven wrote:
>> If machine_desc.map_io is not set, devicemaps_init() in the common ARM
>> code will call debug_ll_io_init().
>
> How about a WARN_ON(mdesc->map_io == debug_ll_io_init) ?  This can only
> really be done when CONFIG_DEBUG_LL is defined because otherwise it's an
> inline function, but it may help to stop these from appearing in the
> first place.

I'd rather have a BUILD_BUG_ON(). Unfortunately MACHINE_END doesn't
know about the machine type, else we could probably add a check to that
macro.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox

Patch

diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index ed263a21d928da39..28ba204e611d1186 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -76,7 +76,6 @@  static const char * const imx6sl_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
-	.map_io		= debug_ll_io_init,
 	.init_irq	= imx6sl_init_irq,
 	.init_machine	= imx6sl_init_machine,
 	.init_late      = imx6sl_init_late,
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index 3de3b7369aef10ca..54fd64b184c8b3e8 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -53,7 +53,6 @@  static const char * const imx6sx_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
-	.map_io		= debug_ll_io_init,
 	.init_irq	= imx6sx_init_irq,
 	.init_machine	= imx6sx_init_machine,
 	.dt_compat	= imx6sx_dt_compat,