From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 44E971BC2A for ; Thu, 19 Feb 2026 18:50:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771527044; cv=none; b=IWwXV5ktwmqk9jbHkqqu1o64+yDWTbV/XEBrQHuXhSmHGlVVbiWxZZMBkFIKAKewbtEZEK7fNL4IAW4scF4ikwPm0S5OxlDnETcUfMUuhlEuaCEvuW6lSf0rtdsQIYIA9A35xioewAhehW+E3RiIcy9Z82c4VK/7t4BS3tGCbP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771527044; c=relaxed/simple; bh=JM8bvUU6nvoYu3l9r+Uw9oiMrboAiLEUmr9jBGBtthc=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=jLXWDXE1ZrIDazs9lAui/QGyZRyRe16X96Tx5Z2Zd5Vg7OPzDQZ4qSLeTcU9Jok1sl+42ojMrAe3x8j2U2I5O5spzjZUFXe13D0VOb4hNYcgKTyGLRSMGVsDO5cz+a4A7R51VVf0EnIuAYJcCszaPEgHLaXHTWEBn2sXcqTw3ts= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=HgwSRMgl; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="HgwSRMgl" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-4362d4050c1so1232681f8f.2 for ; Thu, 19 Feb 2026 10:50:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1771527041; x=1772131841; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to; bh=JM8bvUU6nvoYu3l9r+Uw9oiMrboAiLEUmr9jBGBtthc=; b=HgwSRMglNqj88a8kWE0idz5Dnfw/N8k5KJbWYNe9BKxbzPWEAeFXrxQzL7+PviIpdg NElHQYFHZu9H/4xbVrPwhx7mohl/mm5FgphLP8VY831XhutHjJlH8AozvAXhjXfSU/0L BZNPqmGjM7SHcgcumnMPIuMDswwJvUh5zB4ep4nIqE5NYuAFmZlhAx7FTfz/OAjnCplH LLiiABiZQENkePi3kWWX4t428pb82vEenzVALweB9vw0oMMSLSVsjcohlhI23U9rPGtr RAEYwm41VQk5Xbq/ukavrXR+0+g3sxsXDuOOY5gVkqI5JwZLE5N1+gqBsSSMpia+UFFN RuHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771527041; x=1772131841; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JM8bvUU6nvoYu3l9r+Uw9oiMrboAiLEUmr9jBGBtthc=; b=K/H7kE7En1uhVr5PDdPXTnv4LYZ7pceoHPnnSTNYWO8HeoG0jZ60tfFCICfkvS/pns BxItjLcEcgk+89gBX/ct9nxLH3tZnK51hwWCmtQGMw0Lh0UU9656A+bTYeK/LZLytFJ5 X3Pf3vwmrhKdu1AsFpJVWM8a1BnOZ+j8uOdzcGrgipk6l9wHkLm78GGyGBDp8ZM3KiGw oE9m3mQe7rNn2TgEBCbLjbhMjaUcj0EH9URKlfrBIhHyC6XM7TOnb0RIIqgBQTDMQVj0 yMurKrd2pTlwAnBeJAwMMatThoelGVSI/P9XL4KQxI/fj26/jylLi0T8l5MJc2RZ85PO ucUg== X-Forwarded-Encrypted: i=1; AJvYcCWYEMciBWp64Ack0a7Y6u7dP/oM1oLBZalD/5G39uQVxi9TxmCyj26QY8OiFM2SUYYxTVYhPrdOapTOpRU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy1U6pOAQSPg6zR93ZbQ1GG8EaNaKwZDTlLPPKLm6j+h/P09JmJ Q7atN/a4ynCzR4scgA9qkuNydjysyJY/AgLVDuMYsIYP4ymsoL7cwGmziwzCGcfns8lHhXwYPMq H2qVJAb4= X-Gm-Gg: AZuq6aLrkQw6ETD7SHYmYYBId1hjgpdqFdWEFdM8jkGTHCDWDyPZw4ptEG9shIwBfWI 02qgDntm4B61OwgWq+QlmCmbyl6saBNXWKAVfBKaCVhpuA/uE0JZvKA7qdAXaK8XdGT/g3unMlI TLw9sCN9mwMIz1gm88S1PFaVkcdF4C31jDVqJd5R8hfG0UdQkuwlUcpaCKirATUYEDcsPKgiRmk D24ba+RF1DKrH0MmuqjCw24rPwdRB0+vxDRdkRlstAW1Is5mR/RHGBO/BMS6RebAB3h2FOFIn/Q c30/77zoFs2EcBRwtD21lwXitWcNJnyONLtkyTUbNXsJMKozQU/omkMe42Ag2SHtNT3ZAT3JG6b YLGSVbfpqx8CUA3b8B1ifPAGgbX0EyBPNWBrNd8LdgRbdt1bA4vSkCaxJDNaQvA4YjDB1BA+Ddw oTkLvCbZEUyEbK6okoysX2Yld2uT+9cHudvSHuI6caAZY5obSTu4maAzZq7zHSCw== X-Received: by 2002:a05:6000:26cf:b0:436:1893:f74b with SMTP id ffacd0b85a97d-437978c9f0bmr30816380f8f.6.1771527041301; Thu, 19 Feb 2026 10:50:41 -0800 (PST) Received: from ?IPv6:2804:5078:822:3100:58f2:fc97:371f:2? ([2804:5078:822:3100:58f2:fc97:371f:2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43796abd259sm53249489f8f.24.2026.02.19.10.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 10:50:41 -0800 (PST) Message-ID: <3609083d7eb06ea7a8c117811400ef7ad345c4f2.camel@suse.com> Subject: Re: [PATCH 4/8] printk: Cleanup _braille_(un)register_console() wrappers From: Marcos Paulo de Souza To: Petr Mladek , John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Chris Down , linux-kernel@vger.kernel.org Date: Thu, 19 Feb 2026 15:50:37 -0300 In-Reply-To: <20260206165002.496724-5-pmladek@suse.com> References: <20260206165002.496724-1-pmladek@suse.com> <20260206165002.496724-5-pmladek@suse.com> Autocrypt: addr=mpdesouza@suse.com; prefer-encrypt=mutual; keydata=mDMEZ/0YqhYJKwYBBAHaRw8BAQdA4JZz0FED+JD5eKlhkNyjDrp6lAGmgR3LPTduPYGPT Km0Kk1hcmNvcyBQYXVsbyBkZSBTb3V6YSA8bXBkZXNvdXphQHN1c2UuY29tPoiTBBMWCgA7FiEE2g gC66iLbhUsCBoBemssEuRpLLUFAmf9GKoCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgk QemssEuRpLLWGxwD/S1I0bjp462FlKb81DikrOfWbeJ0FOJP44eRzmn20HmEBALBZIMrfIH2dJ5eM GO8seNG8sYiP6JfRjl7Hyqca6YsE Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (by Flathub.org) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2026-02-06 at 17:49 +0100, Petr Mladek wrote: > The _braille_(un)register_console() wrappers currently attempt to > hide > implementation details like the CON_BRL flag and pc->brl_options. > This > forces callers to handle an unconventional tri-state return value (0 > for > NOP, >0 for success, <0 for error), which makes the control flow > harder > to follow and non-standard. >=20 > Refactor the wrappers to use standard kernel return codes (0 for > success, > -ERRCODE on failure). Move the responsibility of checking brl_options > to the caller to make the logic more explicit. >=20 > Additionally, move the assignment of the CON_BRL flag from the > internal > wrapper to braille_register_console(). This aligns it with how > CON_ENABLED is handled. To maintain symmetry and fix a potential bug > where flags might persist after removal, explicitly clear both > CON_ENABLED and CON_BRL in braille_unregister_console(). >=20 > Signed-off-by: Petr Mladek > --- I had a very similar patch locally, thanks a lot for cleaning this up! Reviewed-by: Marcos Paulo de Souza