From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E632341058 for ; Thu, 19 Feb 2026 14:59:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771513182; cv=none; b=TAe0GZz8sZV9KDMKJx/HCi5VjMbc49t42iZDLwZIS9k3hEHCV8ChmKvzqa0YfZILBNBNi65dqjekNQnAaZd5DEAv8mlsniuvE+Z9OztCqE4FPRfMikv9W0IS4NeAd9cegXzVL8srxpj5pT1fs8B3YgDer7t5OTc2pc86l9oroVs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771513182; c=relaxed/simple; bh=AIWHbFobkfCJzbgej6DaiTCn2zbbiWJf1JY+p2RH0t4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tEVtzTM9EAVx7qQXfYW+zzOhUr7jFOgBVA3tlIqk9Vd7aUKH/CiPqo4LLSWS8zAzXsgUmzcI2K5mfJi2JnUXB+eIC08zqRWiKmiLDoJkzrhVllxoaY8bzsorFAx7Ucz4nGo8tW3Rq7IVyfcEm4oTlx7LVDWGyP/e63e6ipr4WgA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b=AV0lzI6d; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="AV0lzI6d" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-8230d228372so497904b3a.1 for ; Thu, 19 Feb 2026 06:59:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1771513181; x=1772117981; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=/c+ufTrLpsG58ApCb0h6D63ltMSFNI4qA2rtGTpH09c=; b=AV0lzI6dJwhsRfJhGMAADbR2cxZuEaNcU5vc1Qcj32ooa71HjIhPYgEHtl84hyFrDg ekuGMHcekDl+Uin+Cb5giBEegG6bg7qb8ASZ2mYyKfroKy7U9S9FQpAVb1YGJ1t4VdDi PdeCAIrOAArBLykzo/uhgHy6SEbabtdvx1fSs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771513181; x=1772117981; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/c+ufTrLpsG58ApCb0h6D63ltMSFNI4qA2rtGTpH09c=; b=IZ3LV3Xc+J7TMOR0mFJDv5VNyziimCUU0KHXtix2Zgf64QVdN6+fCyMcDbrdRkW1nz Z32dkVBqDmB0J5HnWx6d3Wsm6QNtyuMwQKMtu6yA7cldxPsTdS6U+6am1/z6PfxxIYxS jePShLZeeqnHyg4GufX+fGncAwQ/6/qdESK8DybfL9OPSn+7QDKG+1JWCA0aPQhsRqJ2 YOgDhIBXnR9vDs3heMycE4kOcsx7JQaLvvqQgvqDyVJnjq5U2p6HvR2FNs89/EJXj6Am ifxw+5dtCOJtJr6Z91vmz6q6xOttaMhmPjWv9cOVa1d/QQ+d8G6XgmyZ1dx8u4D9GbiK AtKA== X-Forwarded-Encrypted: i=1; AJvYcCVHJw8U708MA7Yp5LqjIsbI1xqFUgUFsRwXlwZzM9YZ1nbCJd4IsvwD+9uajhHnNcFwoafcK8JQnPlff9k=@vger.kernel.org X-Gm-Message-State: AOJu0YxQVY7XFp1Mm4lajSiHv30CVqB92gw3CB3Ac151jyCvKVBaUc+K MY+IOV3et7rHwFr7O0Lda6rEoJoPMvjpKReGeFAXGSHVdaHj7KP8dXH88edplu4m9fw= X-Gm-Gg: AZuq6aIXXlDk/EQ17c0PLisFKjRZgIAT6QVv9qwcFXAs6xJOvj3gxa6qkNatlMzEzRF l+Z4eFnVmcsbbTFUJak6nQSZB03rVaqV3l6ONtrMACyuwEw+g4MHf4RbcJ2MIof8xNc945/0pmE Nhns9HZAD2XeJAh4+CBdqE7yDrQr68ALnqDnjBvagzFes7D9Xr7BOavggVIDHq9b28bBezQFczd xiAVeNfQVavXFjuxv+ZjvIsMi8/QMdd35UpRkJd38UQo7sOfsiZ8UD2KIYM/JiVtEs28D7PpiDR q0jbTFvesDZPzxS7+REZboquRg5HG/N4a82zAU/MpvWXq68/STYulRSktbLf6ngiW7lzmCokvG7 DpKg3BbgnaAW026ircrgD6iNn4RwBvml2LSOBYpabC9q4xZKJFA1XCdOM9xBCqm5R9NOUWX7cVn eRNlFCE1T4XcEFH9R7exv2qRdJLTVms24= X-Received: by 2002:a05:6a00:4f84:b0:821:7ee2:b692 with SMTP id d2e1a72fcca58-826b65c40dcmr2769153b3a.2.1771513180837; Thu, 19 Feb 2026 06:59:40 -0800 (PST) Received: from localhost ([175.139.248.66]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-824c6bb5596sm19492895b3a.58.2026.02.19.06.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 06:59:40 -0800 (PST) Date: Thu, 19 Feb 2026 22:59:38 +0800 From: Chris Down To: Petr Mladek Cc: John Ogness , Sergey Senozhatsky , Steven Rostedt , Marcos Paulo de Souza , linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/8] printk: Try to register each console as Braille first Message-ID: References: <20260206165002.496724-1-pmladek@suse.com> <20260206165002.496724-6-pmladek@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20260206165002.496724-6-pmladek@suse.com> User-Agent: Mutt/2.2.15 (2b349c5e) (2025-10-02) Petr Mladek writes: >@@ -3918,6 +3922,12 @@ static int try_enable_preferred_console(struct console *newcon, > newcon->match(newcon, pc->name, pc->index, pc->options) != 0) { > /* default matching */ > BUILD_BUG_ON(sizeof(pc->name) != sizeof(newcon->name)); >+ /* >+ * Two entries might have the same pc->name when one was >+ * defined via "devname". >+ */ >+ if (try_only_braille && !is_braille_console_preferred(pc)) >+ continue; > if (strcmp(pc->name, newcon->name) != 0) > continue; > if (newcon->index >= 0 && >@@ -3926,7 +3936,7 @@ static int try_enable_preferred_console(struct console *newcon, > if (newcon->index < 0) > newcon->index = pc->index; > >- if (is_braille_console_preferred(pc)) >+ if (try_only_braille) > return _braille_register_console(newcon, pc); > > err = console_call_setup(newcon, pc->options); This doesn't look right to me. By putting the Braille dispatch inside the if block, you bypass it whenever newcon->match matches. So that means if a console driver matches, the execution skips this default matching block completely, falls through, and silently sets CON_ENABLED without ever registering it as a Braille console or adding it to console_list, and the console is silently lost. The try_only_braille and is_braille_console_preferred(pc) checks likely need to happen before or independently of the match() vs. default matching branch.