[PATCH] Qi: string concatenation doesn't need a backslash

Werner Almesberger werner at openmoko.org
Mon Mar 9 09:05:53 CET 2009


We can get rid of quite a few backslashes since in modern C,
consecutive strings are concatenated at compile time.

Signed-off-by: Werner Almesberger <werner at openmoko.org>

---

diff --git a/src/cpu/s3c2410/gta01.c b/src/cpu/s3c2410/gta01.c
index 15fc315..0371505 100644
--- a/src/cpu/s3c2410/gta01.c
+++ b/src/cpu/s3c2410/gta01.c
@@ -146,13 +146,13 @@ void port_init_gta01(void)
 	*MPLLCON = ((0x7d << 12) + (0x1 << 4) + 0x1);
 	/* Delay after update of PLL: Page 7-19, seven nops */
 	asm __volatile__ (
-		"nop\n"\
-		"nop\n"\
-		"nop\n"\
-		"nop\n"\
-		"nop\n"\
-		"nop\n"\
-		"nop\n"\
+		"nop\n"
+		"nop\n"
+		"nop\n"
+		"nop\n"
+		"nop\n"
+		"nop\n"
+		"nop\n"
 	);
 
 	
@@ -256,17 +256,17 @@ const struct board_api board_api_gta01 = {
 	.get_ui_keys = get_ui_keys_gta01,
 	.get_ui_debug = get_ui_debug_gta01,
 
-	.commandline_board = "mtdparts=" \
-				"neo1973-nand:" \
-				 "0x00040000(qi)," \
-				 "0x00004000(u-boot_env)," \
-				 "0x00200000(kernel)," \
-				 "0x000a0000(splash)," \
-				 "0x03d1c000(rootfs) " \
-			       "loglevel=4 " \
-			       "console=tty0 "\
-			       "console=ttySAC0,115200 " \
-			       "init=/sbin/init "\
+	.commandline_board = "mtdparts="
+				"neo1973-nand:"
+				 "0x00040000(qi),"
+				 "0x00004000(u-boot_env),"
+				 "0x00200000(kernel),"
+				 "0x000a0000(splash),"
+				 "0x03d1c000(rootfs) "
+			       "loglevel=4 "
+			       "console=tty0 "
+			       "console=ttySAC0,115200 "
+			       "init=/sbin/init "
 			       "ro ",
 	.commandline_board_debug = " loglevel=8 ",
 	.noboot = "boot/noboot-GTA01",
@@ -305,7 +305,7 @@ const struct board_api board_api_gta01 = {
 			.block_read = nand_read_ll,
 			.offset_blocks512_if_no_partition = 0x44000 / 512,
 			.filesystem = FS_RAW,
-			.commandline_append = "rootfstype=jffs2 " \
+			.commandline_append = "rootfstype=jffs2 "
 				       "root=/dev/mtdblock4 ",
 		},
 	},
diff --git a/src/cpu/s3c2442/gta02.c b/src/cpu/s3c2442/gta02.c
index b2671b3..e9bc0a3 100644
--- a/src/cpu/s3c2442/gta02.c
+++ b/src/cpu/s3c2442/gta02.c
@@ -307,13 +307,13 @@ void port_init_gta02(void)
 		*UPLLCON = ((88 << 12) + (4 << 4) + 2);
 		/* Magic delay: Page 7-19, seven nops between UPLL and MPLL */
 		asm __volatile__ (
-			"nop\n"\
-			"nop\n"\
-			"nop\n"\
-			"nop\n"\
-			"nop\n"\
-			"nop\n"\
-			"nop\n"\
+			"nop\n"
+			"nop\n"
+			"nop\n"
+			"nop\n"
+			"nop\n"
+			"nop\n"
+			"nop\n"
 		);
 		/* configure MPLL */
 		*MPLLCON = ((42 << 12) + (1 << 4) + 0);
@@ -666,10 +666,10 @@ const struct board_api board_api_gta02 = {
 	.get_ui_keys = get_ui_keys_gta02,
 	.get_ui_debug = get_ui_debug_gta02,
 	.set_ui_indication = set_ui_indication_gta02,
-	.commandline_board = "loglevel=4 " \
-				      "console=tty0 " \
-				      "console=ttySAC2,115200 " \
-				      "init=/sbin/init " \
+	.commandline_board = "loglevel=4 "
+				      "console=tty0 "
+				      "console=ttySAC2,115200 "
+				      "init=/sbin/init "
 				      "ro ",
 	.commandline_board_debug =  " loglevel=8",
 	.noboot = "boot/noboot-GTA02",
@@ -709,7 +709,7 @@ const struct board_api board_api_gta02 = {
 			/* NOTE offset below is replaced at runtime */
 			.offset_blocks512_if_no_partition = 0x80000 / 512,
 			.filesystem = FS_RAW,
-			.commandline_append = " rootfstype=jffs2 " \
+			.commandline_append = " rootfstype=jffs2 "
 					      "root=/dev/mtdblock6 ",
 		},
 	},
diff --git a/src/cpu/s3c6410/om_3d7k-steppingstone.c b/src/cpu/s3c6410/om_3d7k-steppingstone.c
index e181441..71c57f9 100644
--- a/src/cpu/s3c6410/om_3d7k-steppingstone.c
+++ b/src/cpu/s3c6410/om_3d7k-steppingstone.c
@@ -85,11 +85,11 @@ const struct board_api board_api_om_3d7k = {
 	.noboot = "boot/noboot-OM_3D7K",
 	.append = "boot/append-OM_3D7K",
 	.get_ui_keys = get_ui_keys_om_3d7k,
-	.commandline_board = "console=tty0 " \
-			     "console=ttySAC3,115200 " \
-			     "init=/sbin/init " \
-			     "loglevel=8 " \
-			     "rootdelay=1 no_console_suspend " \
+	.commandline_board = "console=tty0 "
+			     "console=ttySAC3,115200 "
+			     "init=/sbin/init "
+			     "loglevel=8 "
+			     "rootdelay=1 no_console_suspend "
 			     "ro ",
 	.commandline_board_debug =  " loglevel=8",
 	.kernel_source = {
diff --git a/src/cpu/s3c6410/smdk6410-steppingstone.c b/src/cpu/s3c6410/smdk6410-steppingstone.c
index 5bc05f0..c1d991f 100644
--- a/src/cpu/s3c6410/smdk6410-steppingstone.c
+++ b/src/cpu/s3c6410/smdk6410-steppingstone.c
@@ -45,8 +45,8 @@ const struct board_api board_api_smdk6410 = {
 	.get_board_variant = get_board_variant_smdk6410,
 	.is_this_board = is_this_board_smdk6410,
 	.putc = putc_smdk6410,
-	.commandline_board = "console=ttySAC0,115200 " \
-			     "loglevel=3 " \
+	.commandline_board = "console=ttySAC0,115200 "
+			     "loglevel=3 "
 			     "init=/bin/sh ",
 	.commandline_board_debug =  " loglevel=8",
 	.noboot = "boot/noboot-SDMK6410",



More information about the openmoko-kernel mailing list