Skip to contentSkip to conversation

ARM: Change misleading warning when CONFIG_CMDLINE_FORCE is used

PATCH Superseded Alexander Holler 3 participants 3 messages Jan 11, 2011 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Change misleading warning when CONFIG_CMDLINE_FORCE is used

When CONFIG_CMDLINE_FORCE is used, the warning

Ignoring unrecognised tag 0x54410009

was displayed. Change this to

Ignoring tag cmdline (using the default kernel command line)

---
 arch/arm/kernel/setup.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/kernel/setup.c +6 -2
index 336f14e..19c0e96 100644
@@ -649,15 +649,19 @@ static int __init parse_tag_revision(const struct tag *tag)
 
 __tagtable(ATAG_REVISION, parse_tag_revision);
 
-#ifndef CONFIG_CMDLINE_FORCE
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
+#ifndef CONFIG_CMDLINE_FORCE
 	strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
+#else
+	printk(KERN_WARNING
+		"Ignoring tag cmdline"
+		" (using the default kernel command line)\n");
+#endif /* CONFIG_CMDLINE_FORCE */
 	return 0;
 }
 
 __tagtable(ATAG_CMDLINE, parse_tag_cmdline);
-#endif /* CONFIG_CMDLINE_FORCE */
 
 /*
  * Scan the tag table for this tag, and call its parse function.
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 ARM: Change misleading warning when CONFIG_CMDLINE_FORCE is used

Hi Alexander,

Quoted 21 lines · Alexander Holler

When CONFIG_CMDLINE_FORCE is used, the warning

Ignoring unrecognised tag 0x54410009

was displayed. Change this to

Ignoring tag cmdline (using the default kernel command line)

---
 arch/arm/kernel/setup.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/kernel/setup.c +0 -0
index 336f14e..19c0e96 100644
@@ -649,15 +649,19 @@ static int __init parse_tag_revision(const struct tag *tag)
 
 __tagtable(ATAG_REVISION, parse_tag_revision);
 

arch/arm/kernel/setup.c static int __init parse_tag_revision(const struct tag *tag) · line 660

Quoted 10 lines
arch/arm/kernel/setup.c +6 -1
-#ifndef CONFIG_CMDLINE_FORCE
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
+#ifndef CONFIG_CMDLINE_FORCE
 	strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
+#else
+	printk(KERN_WARNING
+		"Ignoring tag cmdline"
+		" (using the default kernel command line)\n");
+#endif /* CONFIG_CMDLINE_FORCE */

For strings in a printk() like this you don't need to split them to keep them under 80 characters. This makes it harder to grep for so it's fine (and preferred) to keep this on a single line.

Jamie

#2 lore raw

PATCH 1/1 ARM: Change misleading warning when CONFIG_CMDLINE_FORCE is used

In reply to Alexander Holler

arch/arm/kernel/setup.c static int __init parse_tag_revision(const struct tag *tag) · line 659

Quoted 4 lines · Alexander Holler
arch/arm/kernel/setup.c +4 -0
+#else
+	printk(KERN_WARNING
+		"Ignoring tag cmdline"
+		" (using the default kernel command line)\n");

In addition to Jamey's comment, we do have a set of pr_xxx helpers:

	pr_warning("Ignoring tag cmdline (using the default kernel command line)\n");

which I think is neater.