From nobody Tue Apr 7 22:35:23 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 C6856C4332F for ; Wed, 19 Oct 2022 15:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231288AbiJSPEa (ORCPT ); Wed, 19 Oct 2022 11:04:30 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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; =20 if (!con->write) @@ -2944,7 +2944,7 @@ void console_unblank(void) console_locked =3D 1; console_may_schedule =3D 0; for_each_console(c) - if ((c->flags & CON_ENABLED) && c->unblank) + if (console_is_enabled(c) && c->unblank) c->unblank(); console_unlock(); =20 @@ -3098,7 +3098,7 @@ static int try_enable_preferred_console(struct consol= e *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 =3D=3D user_specifie= d) + if (console_is_enabled(newcon) && (c->user_specified =3D=3D user_specifie= d)) return 0; =20 return -ENOENT; --=20 2.30.2