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: 180169 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1075311dyi; Sun, 17 Dec 2023 23:13:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGaddZL9l/DNRdXeJbLzRIKOOcFPy9mVdTsSsXUHDZc9buWGS0tparV8+CKZiuL+XTjuyx7 X-Received: by 2002:a17:903:41c1:b0:1d0:6ffd:611c with SMTP id u1-20020a17090341c100b001d06ffd611cmr21109344ple.62.1702883592129; Sun, 17 Dec 2023 23:13:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702883592; cv=none; d=google.com; s=arc-20160816; b=rK6pT4v9QhzYSIcIQvrBAP7LpYkCyTld3MWELtPttmjkzBjBIsY5OErluNv3Es+XcU /GYJuJSydU/oqElpQwmBLFnbaq7UV8Rn02dorq7NdVz2KuStfm12zalRHErmpHiT4FHT J0JhiC4u2klBlRkGycDOvJRE2gIalKEPmIzOR66hedsTkW0UV0jWdqHRQLAACV2EpJdT aOFQEl2jFtROcXP90ebDqnUftMiZyPJLwO2BfLNbRq1Vu3VnE7+U4HiGkOSblbkOydkj rXfjRMNmtvq77UuMEVsrNo37m0uRM761SeMlt//AdxdFHrUbVXFpL9nhxVa0n7PlrRr4 Zb7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=MeB1NvmDdiB70lT/yoDqWxJ6t7D4mq2LkQI2TYfm8so=; fh=OQrZIrddo55Tm+afxTOsnGwFgD38y2NNd7tU+1OGSCE=; b=yKYwIjXWJzWVrNVWgIX+7nEzBSmCYpV+X9txKvdn25GSFGDVcU21fy74h5Ixxwe4pJ u12ItG3kAJ7o+/EgQ2jFq3D69Rh6Yhd+a65Pf0rF4VKBRN0xQEgBXDhAsQmVaiKm+aDo Vvv9GMTxm+UEYFZ900eSlSkMQJ4bR3JEAc5ZImHZiF+SGbUu4c90vMe5+MeAFCasQJJW 8Zy+Cr24AK6Qqz3GzpRTF20Rft6DgLPplcoyrK+wH7NMnMIeQ7JbuhJX3EtX6EyXpdry eDdfiAG7u/I4nZgT9qLdmcw6oE5RFDhYUUbrBFreFh4oUxbdfvOkRQV7252TQr8A9JMQ 5kYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atomide.com header.s=25mailst header.b=gqej+RJ6; spf=pass (google.com: domain of linux-kernel+bounces-3084-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3084-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h6-20020a170902704600b001d330f638easi11074330plt.514.2023.12.17.23.13.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 23:13:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3084-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@atomide.com header.s=25mailst header.b=gqej+RJ6; spf=pass (google.com: domain of linux-kernel+bounces-3084-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3084-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C3442284779 for ; Mon, 18 Dec 2023 07:13:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E173BF51B; Mon, 18 Dec 2023 07:12:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="gqej+RJ6" X-Original-To: linux-kernel@vger.kernel.org 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 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785602865196641674 X-GMAIL-MSGID: 1785602865196641674 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. */