Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp527401qtb; Wed, 19 Oct 2022 08:09:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IzS9YLYrZlRnIgaHelaaX0PVCsbZkjofabyLm/mto7t7l8F9NIdkOIh+eNwoa7hpO05Ks X-Received: by 2002:aa7:dc10:0:b0:440:b446:c0cc with SMTP id b16-20020aa7dc10000000b00440b446c0ccmr7910223edu.34.1666192154591; Wed, 19 Oct 2022 08:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666192154; cv=none; d=google.com; s=arc-20160816; b=kz+wcDIMACJr147S4yZnL0lNWQp9qfwLkOn4POppyaa5s6Lot4/QkKwcxg451xZRKE 3FZdu9SpLvz6vfO6/ayoPJV+zZ37yloejsoOmOPgPGPlBYx3rhQkORx19FER3qqkbdbM RoRjrhsn5RgU425Xo2fDhHZ/fO2ZrW7/4Co14PWIUsi0myWsnwK6HQxsenKK80Vdjd7h XLaQyMXq1KYv9YcOjpMXp0pytkKiqhlLMLLD3s+HZeNdqJO52r3+rhbUwjHiny1t2BwI ipY7sWxznvG7BNirfLSqy3Zz8HwOdjsT9rRfnMILmNUfYx9LvzRb9KT2ZS1xK8j4pm2I W4oA== 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=MP5rgFSdehBCliWVe71JQUPCb1f669tU8saiCWaIDO0=; b=r1yO8H6Io6OPmq/VoahRY0BG7DQBGtUI5i47fTugfsjGc61KbLYvQeUUG3XtYxgD9e lzyl6g64KfSYAQh7aNNYhN4kGnP63FKygrl4rRyQzKMqJe2E3JFjgQUfzjE8JNYSWfLm 0Ii20KjIbJ5JQc5C+0h/4uHBE8FLBph+o4QF6HlQ3frZUvUcrzhjYDcjUeIKKLxrZVk9 5g5Hx3t1KNV1GOy5TAa+/xMl2Wtp1TogvCN+0W7eNU/2gJqqSqMaXp3vyNfv6Jw0yTDH UqVxfHyh9Y4Qsn7pIDrKPeJ8uLBM9uFoGgJNzYVxirH7VOIvk4KGV9H+OPnFKzd8+/la taQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SLqa5Phc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ozZhE1jN; 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 n29-20020a50935d000000b0045725a5b76csi13332411eda.294.2022.10.19.08.08.38; Wed, 19 Oct 2022 08:09:14 -0700 (PDT) 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=SLqa5Phc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ozZhE1jN; 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 S230010AbiJSPE2 (ORCPT + 99 others); Wed, 19 Oct 2022 11:04:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232059AbiJSPEC (ORCPT ); Wed, 19 Oct 2022 11:04:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62B6A1911C2 for ; Wed, 19 Oct 2022 07:58:33 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666191365; 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=MP5rgFSdehBCliWVe71JQUPCb1f669tU8saiCWaIDO0=; b=SLqa5PhcnifAXBxPjzPq8RQ5wWHDsFsKLOjJ5Bmh9ZGDeMItqEb2c5andZCY9TcUyGDIR/ dkOOQxmdmn7/PnLwAAjrGDp8lt9Uz8mAMEoOd7urbGXYVldEk8zYCa8/iAY1dVNRfX1p+J Ha+qK8DetElb0MoGktri3Xu4lx9C3kUh6AtB+1DIReSvn7JRz1gWJTFDzw08nHyTiCmChQ XP4mRnKpUirH0pvAQWYC+E4LgSbE3mXbcssJIvwElnPgdqtXfCvaf4dvjVy2e7JmBlnloB h/m+zkpsEomfdmsy9Cb/TNtCQcjleQpQn0jWgpkY1m6W6keiAq6wL/v4NRO/PQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666191365; 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=MP5rgFSdehBCliWVe71JQUPCb1f669tU8saiCWaIDO0=; b=ozZhE1jNVxKFfb0xYXFWRlrgrguzkQU0rcQ9xxPUoqXcDFSb1uLSsqks/WR9QsIUMSaQe8 g5NlOPi7VRafb3CA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk v2 05/38] printk: use console_is_enabled() Date: Wed, 19 Oct 2022 17:01:27 +0206 Message-Id: <20221019145600.1282823-6-john.ogness@linutronix.de> In-Reply-To: <20221019145600.1282823-1-john.ogness@linutronix.de> References: <20221019145600.1282823-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 Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness --- kernel/printk/printk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index e8a56056cd50..7ff2fc75fc3b 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2658,7 +2658,7 @@ static bool abandon_console_lock_in_panic(void) */ static inline bool console_is_usable(struct console *con) { - if (!(con->flags & CON_ENABLED)) + if (!console_is_enabled(con)) return false; if (!con->write) @@ -2944,7 +2944,7 @@ void console_unblank(void) console_locked = 1; console_may_schedule = 0; for_each_console(c) - if ((c->flags & CON_ENABLED) && c->unblank) + if (console_is_enabled(c) && c->unblank) c->unblank(); console_unlock(); @@ -3098,7 +3098,7 @@ static int try_enable_preferred_console(struct console *newcon, * without matching. Accept the pre-enabled consoles only when match() * and setup() had a chance to be called. */ - if (newcon->flags & CON_ENABLED && c->user_specified == user_specified) + if (console_is_enabled(newcon) && (c->user_specified == user_specified)) return 0; return -ENOENT; -- 2.30.2