Skip to contentSkip to conversation

arm: msm: trout: fix build failure without UART

PATCH In review Daniel Walker 2 participants 4 messages Apr 23, 2010 – Apr 24, 2010

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

PATCH 1/2 arm: msm: trout: fix build failure without UART

Without a debug uart selected you get this failure,

arch/arm/mach-msm/board-trout.c:85: error: 'MSM_DEBUG_UART_PHYS' undeclared here (not in a function) arch/arm/mach-msm/board-trout.c:86: error: 'MSM_DEBUG_UART_BASE' undeclared here (not in a function)

This just removes these lines in that case.

---
 arch/arm/mach-msm/board-trout.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-trout.c +2 -0
index 9793ff4..b88aec2 100644
@@ -82,8 +82,10 @@ static void __init trout_map_io(void)
 }
 
 MACHINE_START(TROUT, "HTC Dream")
+#ifdef CONFIG_MSM_DEBUG_UART
 	.phys_io	= MSM_DEBUG_UART_PHYS,
 	.io_pg_offst	= ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
+#endif
 	.boot_params	= 0x10000100,
 	.fixup		= trout_fixup,
 	.map_io		= trout_map_io,
Signature · 1 line
1.6.2.3
#1 lore raw

PATCH 2/2 arm: msm: smd: fix initcall prototype compiler warning

This fixes the following warning,

arch/arm/mach-msm/smd_debug.c:240: warning: initialization from incompatible pointer type

---
 arch/arm/mach-msm/smd_debug.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-msm/smd_debug.c +4 -2
index 0cc3ef8..3b2dd71 100644
@@ -221,13 +221,13 @@ static void debug_create(const char *name, mode_t mode,
 	debugfs_create_file(name, mode, dent, fill, &debug_ops);
 }
 
-static void smd_debugfs_init(void)
+static int smd_debugfs_init(void)
 {
 	struct dentry *dent;
 
 	dent = debugfs_create_dir("smd", 0);
 	if (IS_ERR(dent))
-		return;
+		return 1;
 
 	debug_create("ch", 0444, dent, debug_read_ch);
 	debug_create("stat", 0444, dent, debug_read_stat);
@@ -235,6 +235,8 @@ static void smd_debugfs_init(void)
 	debug_create("version", 0444, dent, debug_read_version);
 	debug_create("tbl", 0444, dent, debug_read_alloc_tbl);
 	debug_create("build", 0444, dent, debug_read_build_id);
+
+	return 0;
 }
 
 late_initcall(smd_debugfs_init);
Signature · 1 line
1.6.2.3
#2 lore raw

Re: [PATCH 2/2] arm: msm: smd: fix initcall prototype compiler warning

Quoted 5 lines · Daniel Walker

This fixes the following warning,

arch/arm/mach-msm/smd_debug.c:240: warning: initialization from incompatible pointer type

ACK.

Quoted 33 lines
---
 arch/arm/mach-msm/smd_debug.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-msm/smd_debug.c +4 -2
index 0cc3ef8..3b2dd71 100644
@@ -221,13 +221,13 @@ static void debug_create(const char *name, mode_t mode,
 	debugfs_create_file(name, mode, dent, fill, &debug_ops);
 }
 
-static void smd_debugfs_init(void)
+static int smd_debugfs_init(void)
 {
 	struct dentry *dent;
 
 	dent = debugfs_create_dir("smd", 0);
 	if (IS_ERR(dent))
-		return;
+		return 1;
 
 	debug_create("ch", 0444, dent, debug_read_ch);
 	debug_create("stat", 0444, dent, debug_read_stat);
@@ -235,6 +235,8 @@ static void smd_debugfs_init(void)
 	debug_create("version", 0444, dent, debug_read_version);
 	debug_create("tbl", 0444, dent, debug_read_alloc_tbl);
 	debug_create("build", 0444, dent, debug_read_build_id);
+
+	return 0;
 }
 
 late_initcall(smd_debugfs_init);
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw
In reply to Daniel Walker
Quoted 8 lines · Daniel Walker

Without a debug uart selected you get this failure,

arch/arm/mach-msm/board-trout.c:85: error: 'MSM_DEBUG_UART_PHYS' undeclared here (not in a function) arch/arm/mach-msm/board-trout.c:86: error: 'MSM_DEBUG_UART_BASE' undeclared here (not in a function)

This just removes these lines in that case.

ACK.

Quoted 19 lines
---
 arch/arm/mach-msm/board-trout.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-trout.c +2 -0
index 9793ff4..b88aec2 100644
@@ -82,8 +82,10 @@ static void __init trout_map_io(void)
 }
 
 MACHINE_START(TROUT, "HTC Dream")
+#ifdef CONFIG_MSM_DEBUG_UART
 	.phys_io	= MSM_DEBUG_UART_PHYS,
 	.io_pg_offst	= ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
+#endif
 	.boot_params	= 0x10000100,
 	.fixup		= trout_fixup,
 	.map_io		= trout_map_io,
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html