From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 AA4672C187 for ; Tue, 17 Feb 2026 08:56:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771318567; cv=none; b=ugVAtRovN/NrApT8ovHkzKIDaMN1WoNKliIyF1ca97kUWqy8Kx1pDOo6LtrP4oEug9c791hYhEalXVyqj4fWl0fmWNXiPMX/bLREeZmqn8FXrtMNoIN+QsOH42ShgrEDK06Jq00R8WwE/3nFtEXI+DQSSIYkDS6x1VrnpRwpDgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771318567; c=relaxed/simple; bh=5/ypDf6t7v747k1hmz4QlWTbSkOp6O/wdzPm06ONNQo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Y3S/5fsd2bfwmMCC+lXjbRMHyb0ynsZTli7miy4X25WKY+SYGtqq7YMbF4vKmpix19HbOt8oK9YntKwLFmUxHKfaNklNRlgQycQiLZlzwVE0ntWUlBLZYcPPIf2OHdPAFd+Aq7LAn73Ya139Nd2dRHq7Ks26mwzn8C24a3Sb1o4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pUxHAEXo; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=t7xn8p4d; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pUxHAEXo"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="t7xn8p4d" From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1771318563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EIpyfNl1SWd3Fv+CBpWscjolvdus0wrWs+JEbql/1No=; b=pUxHAEXo8xie6GzAHnZ/2moh73YL4pc8QuI1pltYTkHKpA7yExXfXoUZWLPN2jdnMR6nyw rxxTRoL3WIAp0qhrivGDxH5mQSRv4luizb4/JxN+/ynOmJsXY3vJpXXDaELL0r9AQ3wpZu nJD9xEbkYjq5cVOxwAFVbjSx74DL9qYD1rUxT8U3xJI1lmXaahUyg0gofYeNIFGg40rF6J OW7FA2PLPvrarxvPHHAabOFKj1wT2HmQToJxx6sr6Qg57WDy5m4sedbWV3pabd3yCayjYQ ZO2i9J1KsUCgW7+0VsijDDRWHExWgxSNEAjfC7+uQQYUBwhpRDcvwuLOKWwOvQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1771318563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EIpyfNl1SWd3Fv+CBpWscjolvdus0wrWs+JEbql/1No=; b=t7xn8p4dwdQ6654CsksxrL6ymB+qn8ZnUnJzLRpN5ZD1ros9CZkiaKGhnSGI/WbRViA3WQ rlhJ20y4ITx+eXCw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Marcos Paulo de Souza , Chris Down , linux-kernel@vger.kernel.org, Petr Mladek Subject: Re: [PATCH 0/8] printk: Clean up preferred console handling In-Reply-To: <20260206165002.496724-1-pmladek@suse.com> References: <20260206165002.496724-1-pmladek@suse.com> Date: Tue, 17 Feb 2026 10:02:03 +0106 Message-ID: <87cy23bvfg.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Hi Petr, On 2026-02-06, Petr Mladek wrote: > this patches does some clean up of the code for handling preferred consoles > in the console registration code. > > + 1st and 2nd patch try to improve a naming. > > The meaning of struct console_cmdline has changed over time. > The meaning of "preferred_console" variable has always been a bit > confusing and it has got even worse after adding the support for > Braille consoles. > > > + 3rd patch remove some code duplication. It better defines and describes > the rules for adding and updating preferred consoles. It uses a more > defensive coding style. > > > + 4th, 5th, and 6th patch improve handling of Braille consoles. > They are preferred via the command line but they do not get > printk() messages and are not associated with /dev/console. > > The new code makes this more obvious. Also it explicitly > defines the relation against default consoles and other > non-Braille preferred consoles. > > > + 7th patch removes a hidden side effect of > try_enable_preferred_console() > > > + 8th patch removes the last hidden side effect of > try_enable_preferred_console() and allows to call it > only when there are any non-Braille preferred consoles. > > > I tested many scenarios of fixed several bugs. I did my best to > prevent regressions. > > This patchset is a prerequisite for Marcos' clean up of CON_ENABLE > flag handling. It should prevent regressions caused by the > hidden effects of try_enable_preferred_console(), for example, > see https://lore.kernel.org/r/89409a0f48e6998ff6dd2245691b9954f0e1e435.camel@suse.com > > Also I am working on a feature which would allow to explicitly > enable/prefer consoles proposed by SPCR, device tree, or > platform-specific code using a generic "console=platform". > This clean up is a prerequisite, see > https://github.com/pmladek/linux/tree/console-platform-poc1-iter9 > > The patchset has been re-based on top of v6.19-rc8. I have finished my review. I just had feedback relating to update_preferred_console() and also adding some function description comments to __add_preferred_console(). John