Skip to contentSkip to conversation

HACK: earlyprintk: Allow nocfg and keep together

PATCH In review Andy Shevchenko 1 participant 2 messages Jan 19, 2018

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

PATCH 1/1 HACK: earlyprintk: Allow nocfg and keep together

---
 arch/x86/kernel/early_printk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/early_printk.c +2 -2
index 7e07427df3f4..9606e45da124 100644
@@ -204,7 +204,7 @@ static __init void early_serial_init(char *s)
 	 * Lastly, initialize the hardware
 	 */
 	if (*s) {
-		if (strcmp(s, "nocfg") == 0)
+		if (strncmp(s, "nocfg", 5) == 0)
 			/* Sometimes, we want to leave the UART alone
 			 * and assume the BIOS has set it up correctly.
 			 * "nocfg" tells us this is the case, and we
@@ -320,7 +320,7 @@ static __init void early_pci_serial_init(char *s)
 	 * Lastly, initialize the hardware
 	 */
 	if (*s) {
-		if (strcmp(s, "nocfg") == 0)
+		if (strncmp(s, "nocfg", 5) == 0)
 			/* Sometimes, we want to leave the UART alone
 			 * and assume the BIOS has set it up correctly.
 			 * "nocfg" tells us this is the case, and we
Signature · 1 line
2.15.1
#1 lore raw

On Fri, 2018-01-19 at 19:35 +0200, Andy Shevchenko wrote:

Sorry, noise.

I will send a proper one soon.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy