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 EEDEE199920 for ; Thu, 19 Feb 2026 15:35:13 +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=1771515315; cv=none; b=BFRre56yhLcO3wpgxSYxTLJDA+Qcw3c6TlQeqBms2/paqy3WEo5pIpJRWp+AgoOkiVqKj2KHgQqTU3p3/+YmScUjt3ydJbx42E0NRkQUGMwqXwjYE6oiEPRKqDc4Ncd7GK8ssbSwK4DInwzCTSlILhoGh73i5EGAOkOnSuLUPLw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771515315; c=relaxed/simple; bh=ewmDp0Qig0PN4/7G6o0tR0gTd51DJkXLuiAZhJkPPMo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=t2NNXCDevabkucxoDto33xLGAADav3jfFTJE0MUarr1j8XxSNzXW8ScolbAzz6sLT2tEO9BAbvlESGKm1YLiP+PgCgNWbMBBv3DrvuG/jb9I6AUxTQpYuCKS9mVNMdVoOsE8XlJh1s80fRMEzPVkAebjrtd2dghHpoIWYqVTU7g= 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=JRZIQHnH; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6Nil/YYv; 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="JRZIQHnH"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6Nil/YYv" From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1771515312; 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=QMrma49cP6ACxn2cr3oPPEUEeQrrSbdC7nMANDMkLCQ=; b=JRZIQHnH/MNfKDyZIVuQyT6wRUh4IkwtKa84oOFZDkJyiwzPzwvxlTrCrZuXEa35CuEX5e mKetlsgoAMK3eR9TXsQG155FQDPJCM3zn8kdi4QvRtQfHt4wPOEgEISzHL5JmDHEEKREba EV0gXh9E8F5iumwwSivfqTo0W9Fg9n3UbPJzQIi3sH0iXMrBViczTS9FTyA7jgtaFjrMAf /mdZzRL21NgH64QYNA1Y7Js/Hj494Mk2kBgJNyKLRbEABLQeua7dtuBhBZU2mGr3/YRhUb kTtOX7pAy0NDlCmv/j0XRKS6hT/jYn5ngNeaIxkIDXy31UmGG4t2eGPGrEZezw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1771515312; 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=QMrma49cP6ACxn2cr3oPPEUEeQrrSbdC7nMANDMkLCQ=; b=6Nil/YYv8len7Kv2/PkvwuwZZC8LfjSptIBEj2IFRldshvvy1qKGQsA5991XsGdSI9S4n3 BXrWEKeUo+73vcCw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Marcos Paulo de Souza , Chris Down , linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/8] printk: Do not set Braille console as preferred_console In-Reply-To: References: <20260206165002.496724-1-pmladek@suse.com> <20260206165002.496724-7-pmladek@suse.com> <87qzqkd64x.fsf@jogness.linutronix.de> Date: Thu, 19 Feb 2026 16:41:11 +0106 Message-ID: <875x7sn3v4.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-19, Petr Mladek wrote: > We actually also need to prevent setting "preferred_dev_console" when > the same console has been preferred as Braille before, for example: > > console=brl,ttyS0,115200 console=ttyS0,115200 > > One might argue that the later definition should win. But it would > be a regression. > > The motivation to keep the current behavior is that the Braille console > is special. IMHO, it should always win. Otherwise, the user might have > hard times to debug the problem. I have no experience about how a Braille console is used/configured in the real world. But your reasoning is clear. Once a device has been flagged as a Braille device, it can never be un-flagged. > My new version of this code is: > > /* > * The last preferred console should get associated with /dev/console. > * Except for the Braille console which can't get associated with > * /dev/console. One level history should be enough because only one, > * the VisioBraille device, is supported at the moment. > */ > if (brl_options) { > want_braille_console = true; > if (preferred_dev_console == i) { > preferred_dev_console = preferred_dev_console_prev; > preferred_dev_console_prev = -1; > } > } else if (!is_braille_console_preferred(pc)) { > preferred_dev_console_prev = preferred_dev_console; > preferred_dev_console = i; > } Yes, this looks good. Thanks. John