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 01C7C318EE6 for ; Mon, 16 Feb 2026 16:07:11 +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=1771258033; cv=none; b=Uhl0ONnjYxhhGrgw+Wr2G+lH2nBoV6EbGwY4j1jGxswHhUYWRXk11yPeVX23rkZQXfgUmFmmVbfybP3AqwwRcly/k1lXqhUKQy0eCaSA2JCnmWcuhyuBb5VAqQsRlTNjNZk9JEyz/MtZ1TvRCA6Hus0mPpBabioHrjdyZrZ6eIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771258033; c=relaxed/simple; bh=XPvQWEhVVDiDL/46U+I2koIwrv4Mrj7BHqNDeVs2xB8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=qfSkk4swtJeCfqmDRf4pud5/dfEcEW9VLqqh6OeAlW0MK25kxDigiitdtH8l/NNtyq/gyXByKKCebORtsNVSePZyg0Pwxpg3cyNoQjYYhqRRo3YgYzJs5N6fEMGKj765IKjNr73nixJggWjgrU1FsKXJ5EKiVrCsopQz4mc7yp4= 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=uhKW+aYu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YEP6IqYe; 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="uhKW+aYu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YEP6IqYe" From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1771258030; 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=+BzNaRdTdM6e8TDJ1c/bCW2f9vHlhWE4YECxKt73Un0=; b=uhKW+aYu5STY9lUUWkFMVj+T81lQTBJzfa5uCV2c6QOda23dgYeqJX2/qVnzPpVk56c+1N /OsUC+d9WwJzt6QkvOM3QTwFX4cw7nztZBy1ZPlk1/68ngXI+gHK98pm11GezgV43QKv/W dFfbChqyYeIZRYD6/OPLeB9cmP+Uhtj2xHcjNsHDIyxEesfLDFFj4VNwxd+RWz1Uj2+y14 mm3QBWB8twhF0++lEmii6QIdsryg5Yjbe3apzREkHfqm8oW09/LVkxI+q5Si7EzA1JJ0cK +n/4hDYj1hwyoeHxUR1EAOpD9a4XGptpM5hE2/O5G8285b5NT6fLoHI1SBEKUQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1771258030; 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=+BzNaRdTdM6e8TDJ1c/bCW2f9vHlhWE4YECxKt73Un0=; b=YEP6IqYeMPC6nBFG17BKXwIgVoYbX84PutBKdaOCAletfyV9tixhP/vyOA5GZSJ21qEH4u 2QWAQ6SSSbwpacAA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Marcos Paulo de Souza , Chris Down , linux-kernel@vger.kernel.org, Petr Mladek Subject: Re: [PATCH 6/8] printk: Do not set Braille console as preferred_console In-Reply-To: <20260206165002.496724-7-pmladek@suse.com> References: <20260206165002.496724-1-pmladek@suse.com> <20260206165002.496724-7-pmladek@suse.com> Date: Mon, 16 Feb 2026 17:13:10 +0106 Message-ID: <87qzqkd64x.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 On 2026-02-06, Petr Mladek wrote: > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 279b36ef90bd..eb224eaace64 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -365,6 +365,7 @@ static int console_locked; > static struct preferred_console preferred_consoles[MAX_PREFERRED_CONSOLES]; > > static int preferred_dev_console = -1; > +static int preferred_dev_console_prev = -1; > static bool want_braille_console; > int console_set_on_cmdline; > EXPORT_SYMBOL(console_set_on_cmdline); > @@ -2555,10 +2556,23 @@ static int update_preferred_console(int i, const char *name, const short idx, > > braille_update_options(pc, brl_options); > > - if (brl_options) > + if (brl_options) { > want_braille_console = true; > - else > + /* > + * This console name will always get enabled as Braille > + * console. It takes special code paths in register_console(). > + * Do not treat it as a normal preferred_console. > + */ > + if (preferred_dev_console == i) > + preferred_dev_console = preferred_dev_console_prev; I am wondering if in this case it should also do: preferred_dev_console_prev = -1; to make sure that @preferred_dev_console never ends up at a Braille device. > + } else { > + /* > + * Only the VisioBraille device is supported at the moment. > + * One level history should be enough. > + */ > + preferred_dev_console_prev = preferred_dev_console; > preferred_dev_console = i; > + } > > /* > * @c console was defined by the user on the command line. John Ogness