From patchwork Mon Dec 18 07:09:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 756338 Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7E4879F8; Mon, 18 Dec 2023 07:12:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=atomide.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="gqej+RJ6" Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id CF38B603E6; Mon, 18 Dec 2023 07:12:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1702883551; bh=kzAidhy8zpKe5tgeK43XUshUlfG4P+Tce1ryVoHcL6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gqej+RJ6aZ+I73/1JjzQbOu7RhV9WhSM6ZPoHEFtIR1m9bYLcXDlWiDRIp130+6sY q99S+LC8Vp+gjHKdsJHSVgs3s0pfsLRTf5X1/i2YJH6gPiPIxXJnziptSbd2Dzp1WX 0j7+8NTsHYYT4p91u+DFJBO7dBlfvC+zACZ26UA+DiVJgEc/eTcWJyeQhanKtTlJ5U X8wutJuK1Oh1nGtJXVZcSO0PMSTJsdHUWBTQvhu7Flee87P9YOkmjzE/OpCZOqCiyI YWB+UMOCW9aP1YP9AGrY1qw4HTDXQpeQfMY+ea13eI/SjxKwrhXMIodI0HgwM0J9og 1Ij2lzTk1ELKA== From: Tony Lindgren To: Greg Kroah-Hartman , Jiri Slaby , Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky Cc: "David S . Miller" , Andy Shevchenko , Dhruva Gole , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [RFC PATCH v5 2/6] printk: Don't try to parse DEVNAME:0.0 console options Date: Mon, 18 Dec 2023 09:09:49 +0200 Message-ID: <20231218071020.21805-3-tony@atomide.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231218071020.21805-1-tony@atomide.com> References: <20231218071020.21805-1-tony@atomide.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Trying to parse the console for a console=DEVNAME:0.0 style console does not work as console_setup() tries to make a console index out of any digits passed in the kernel command line for console. In the DEVNAME:0.0 case, the name can contain a device IO address. Signed-off-by: Tony Lindgren --- kernel/printk/printk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2459,6 +2459,10 @@ static int __init console_setup(char *str) if (console_opt_save(str, brl_options)) return 1; + /* Don't attempt to parse a DEVNAME:0.0 style console */ + if (strchr(str, ':')) + return 1; + /* * Decode str into name, index, options. */