Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp901879rwb; Wed, 16 Nov 2022 09:07:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf4JOXFWt+17HHoCmdSWuSLt1wol3At8FsQ9gXiBrhTGR1+mfslVaQW82Cz9koBq72RjUVQs X-Received: by 2002:a17:90a:fe93:b0:20a:b98f:b839 with SMTP id co19-20020a17090afe9300b0020ab98fb839mr4663352pjb.23.1668618456440; Wed, 16 Nov 2022 09:07:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668618456; cv=none; d=google.com; s=arc-20160816; b=U8Cw/CDm1jNJ6uHS0vzbzCR6OeyoCm4/+FvoPuXX10larZrZ4D2zBHd1SjtmlyQI77 6GlnVrYGnrmFRsNqfUAgxor7wReza6QN+UsgE4qRRmT6GQjBOe/Efd+KJ6OS567Ia7jS 1WXDfmlGGO3DBzd0wHrPJsZKibge1LwaEjc4kEhudM+K3MWaD7GI9ByjKGQMNFgPmw0s dJ7kaXLMvMF9jCsMuj6nLDvzOC1pzN8LKQ6KEtxyKSz7L0Qz9hsL8tuUDydD6jFNc5gO 65uNPW2TRpiY6ORXY0jmWso3Svmh2tWR2aDROep046C6NynYW8iqYdX3xzlqske/suGi cMfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=+1TqEd+pwmRnewIM2sroSQVcuwkSMDWChGspRlPqu/A=; b=oFcZqi8KLCILyV5qJ3HUMpsItdNRnUT6WV2TFrbXD4JPLpJG8QeeMQ0Co1Rx2pXPib rwiKzVCQlAZXLcuvTRIMYiPNeRvLetkaWAxiPeh6BqskQV32nfLITb4tCXt6JVVSWNcp uKuGOaY15i0TRMKHEAQsj1XbenepW51m6Aptn8zSjtCUSZReM6Fv/BA37+9GTASXyY2S zPySEOCBhr/wDOISHfTrGI+0r5MxMdayJU6s+wsuja9b3TFCQ+n99CUQSg1syu7WuOdI 1cdOhAiFCKNuF+vTN5JLT+Dy1SpYh+Ehuse4TPFRtg9oS++paNWLU70k3v8/Ur4CT+Hj jogg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qkWNZuHI; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i189-20020a6387c6000000b00476e640ddfesi2475368pge.80.2022.11.16.09.07.23; Wed, 16 Nov 2022 09:07:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qkWNZuHI; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234583AbiKPQWU (ORCPT + 91 others); Wed, 16 Nov 2022 11:22:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233256AbiKPQWC (ORCPT ); Wed, 16 Nov 2022 11:22:02 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAB6F43856 for ; Wed, 16 Nov 2022 08:22:00 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668615719; 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=+1TqEd+pwmRnewIM2sroSQVcuwkSMDWChGspRlPqu/A=; b=qkWNZuHIxGALpO16uCXZdJ0UuvGmJmsNr20J0bzpEBue6UaxzNZCJq1PYOPHQo0mny88+2 S8iJQI1dPomnzF3jtLFK+W82WvVJ/5hbXiqaIXfnt6RQmYCU2oZn+13JOqaROuN0y0gzwG 73Gwr7hBFk25eIvHWW7261YYsJdqJiQwan8tVK933Xt79BS9E160iDOkoIB4CQlv/Kg+QY iNxy2JFmnFdBCkG2dFXomeU6qWFOMl0fsfvWQ3EFTE3YrWtDGw9SSMU8MYeN17CVgMsKu8 BAAw9WsJxFb0lK1gQAIsYG+wVMPJP8rZNV7Izm4FdgXd1XVuhXr7gRmSLjgMUw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668615719; 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=+1TqEd+pwmRnewIM2sroSQVcuwkSMDWChGspRlPqu/A=; b=7n/mofXba0q/ZMlL7TlNyX0vnqpss/9Hvmr9KIGRFCUuszM8XhWj4URUkgM6600JCmmnpJ JCyjTH3cInixUQDg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk v5 04/40] printk: register_console: use "registered" for variable names Date: Wed, 16 Nov 2022 17:27:16 +0106 Message-Id: <20221116162152.193147-5-john.ogness@linutronix.de> In-Reply-To: <20221116162152.193147-1-john.ogness@linutronix.de> References: <20221116162152.193147-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = false; - bool realcon_enabled = false; + bool bootcon_registered = false; + bool realcon_registered = false; int err; for_each_console(con) { @@ -3168,13 +3168,13 @@ void register_console(struct console *newcon) for_each_console(con) { if (con->flags & CON_BOOT) - bootcon_enabled = true; + bootcon_registered = true; else - realcon_enabled = true; + realcon_registered = true; } /* 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)) == CON_CONSDEV)) { newcon->flags &= ~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)) == CON_CONSDEV) && !keep_bootcon) { struct hlist_node *tmp; -- 2.30.2