From nobody Mon Apr 13 17:14:06 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9ADAC43217 for ; Mon, 14 Nov 2022 16:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237579AbiKNQ35 (ORCPT ); Mon, 14 Nov 2022 11:29:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237441AbiKNQ3i (ORCPT ); Mon, 14 Nov 2022 11:29:38 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B037810AC for ; Mon, 14 Nov 2022 08:29:37 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668443376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pEuSpcGiXYy1rNkif2p1RcLRxWAuPnhCpMJ3boeNpjg=; b=N/bsqRcka6hlDrx/SlwGRNAsEbFEBXRjQwbdRoXt4hlze32AZsQt/rhmkNMken4IpcG54I +KvWEBHaer8/Gei53H6l+GCecFD4I7gidtMF6CWblJihnzxQzE5DwB42jQlbFiI1d7JifO hFuuAyVPpFY967KrUNNJmdGq8x356zKRjK8THEwPyuHhFB2E7udRjbXnkVyFPxcQxw1HqS B124lIIlpqwf3zgW5+iBRgUIoTHePgLGxtl5xlRRnuNpgcLJeXVGdEkcps40nCTPWHz7+L /hurUZ2DPWtDUY2bh67wq39C+NuG0oiArgS1VEasLsceGezG9sOlOXjveNMh1Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668443376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pEuSpcGiXYy1rNkif2p1RcLRxWAuPnhCpMJ3boeNpjg=; b=rsJm1DNOHkXtPr/zx3jxXiVx0pONhvzTAgITQSLoTexSWFuCX4rsVZoPheeJfALDD322mU Ob7/pqdT1WRODLCA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk v4 04/39] printk: register_console: use "registered" for variable names Date: Mon, 14 Nov 2022 17:34:57 +0106 Message-Id: <20221114162932.141883-5-john.ogness@linutronix.de> In-Reply-To: <20221114162932.141883-1-john.ogness@linutronix.de> References: <20221114162932.141883-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The @bootcon_enabled and @realcon_enabled local variables actually represent if such console types are registered. In general there has been a confusion about enabled vs. registered. Incorrectly naming such variables promotes such confusion. Rename the variables to _registered. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 173f46a29252..3d449dfb1ed6 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -3156,8 +3156,8 @@ static void try_enable_default_console(struct console= *newcon) void register_console(struct console *newcon) { struct console *con; - bool bootcon_enabled =3D false; - bool realcon_enabled =3D false; + bool bootcon_registered =3D false; + bool realcon_registered =3D false; int err; =20 for_each_console(con) { @@ -3168,13 +3168,13 @@ void register_console(struct console *newcon) =20 for_each_console(con) { if (con->flags & CON_BOOT) - bootcon_enabled =3D true; + bootcon_registered =3D true; else - realcon_enabled =3D true; + realcon_registered =3D true; } =20 /* Do not register boot consoles when there already is a real one. */ - if (newcon->flags & CON_BOOT && realcon_enabled) { + if ((newcon->flags & CON_BOOT) && realcon_registered) { pr_info("Too late to register bootconsole %s%d\n", newcon->name, newcon->index); return; @@ -3216,7 +3216,7 @@ void register_console(struct console *newcon) * the real console are the same physical device, it's annoying to * see the beginning boot messages twice */ - if (bootcon_enabled && + if (bootcon_registered && ((newcon->flags & (CON_CONSDEV | CON_BOOT)) =3D=3D CON_CONSDEV)) { newcon->flags &=3D ~CON_PRINTBUFFER; } @@ -3268,7 +3268,7 @@ void register_console(struct console *newcon) * went to the bootconsole (that they do not see on the real console) */ con_printk(KERN_INFO, newcon, "enabled\n"); - if (bootcon_enabled && + if (bootcon_registered && ((newcon->flags & (CON_CONSDEV | CON_BOOT)) =3D=3D CON_CONSDEV) && !keep_bootcon) { struct hlist_node *tmp; --=20 2.30.2