Message ID | 20221019145600.1282823-9-john.ogness@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp378002wrs; Wed, 19 Oct 2022 08:08:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5oZwnY/rGZIAWOKrEyN2mKOTjLrxQbzFfLQTd5kGyB17PMykOyTfAJVEAA1ZhCwRSsuzLX X-Received: by 2002:a17:907:2712:b0:78d:a223:729b with SMTP id w18-20020a170907271200b0078da223729bmr7162687ejk.443.1666192095505; Wed, 19 Oct 2022 08:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666192095; cv=none; d=google.com; s=arc-20160816; b=BDG1RmPbaYDkGzYO84hbVZaFyc7jhRG+atnMA+anSGjgUS69vFu28fuWkrsTPn2UW2 2YQo8P4cmCqAzie5Ne+Bba50m3bHEK4VxLaE3urvFGaO97fAwO7jHo+bSua0sL+siVYv YoyCtZ7AEJLu23bAPab5jvU6V1bNeUnH1T4PeTEe8kS+r+aXdO2n6VA5itmTtQkSJ8m2 wtWkqnvx+BXALw4ueRPgczBn3Ni0UcePkWmV6RnHyt5Ns6nTA3Xef0QEsR93TDzJUu89 xUuAXCPreT5hDmIYCzOgb1sGcNEfjYLG0CZ3f9aHdYNWskBjTHVtnRF0zjL/DksTtkcn Z8lg== 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=ANsy39dTo+95E1TXTBS5kbs28UVGSNMF6vh3Au875fs=; b=qsn1Xw1p0Zps7XduZd7MxDx3qnPcp8RqLKyS3L63qOTF0gDTFrOttfjAdf9zB1iVPy qBwJF3ofMd49PaBDHxoDeJa/1BH1zipHKBlntzXXrB22N6Vv6su9H0LMW+8wkc1mo9+k 2d+lqRrfNBYY1yz+NKhMOWB3bkB4PquttFJz0Oe4csDniTkOBWEDi15pNWdbuiEhBTfo Wqi3/ego/D0FgjtYl5sVMgA/oFbepruPK5/yLwaF2GUm3XUCM0LxIbvICsGCobUM3DPa 3NVGREl/zAY8RoiamZz+ICN5+H2M/QcL6eMDIfNkh8CqT3dgg/+Z65dWHz9lwxv4i4nd HbFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wBedELtU; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cy16-20020a0564021c9000b0045c645405bdsi14244431edb.240.2022.10.19.08.07.44; Wed, 19 Oct 2022 08:08:15 -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=wBedELtU; 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 S231671AbiJSPFQ (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Wed, 19 Oct 2022 11:05:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232112AbiJSPEF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Oct 2022 11:04:05 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ACCBACF55; Wed, 19 Oct 2022 07:58:34 -0700 (PDT) From: John Ogness <john.ogness@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666191366; 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=ANsy39dTo+95E1TXTBS5kbs28UVGSNMF6vh3Au875fs=; b=wBedELtUaj0zJeFDpwmo+Eyrsj3vhnslVQMMnOkfh/q28nnuprj+u3It6GYfDmuHkyH1Z0 jNvgvw0kZdalO6FFSXJu2mqO47j5IZHrSszNINkfYz08dHv/g24BIipbzVvvkCUtwUEd6c /G5ZUEi7k1R4vBBcPi0q5lAPBZi73IxF0DRlGFYb+7B7MuBL8SZrA8ne0tSMtqkeo+Yjiz U1qZfnDQPMOveo2W5xC7mJmp6jwh2VhohUHK7OWYalPnB+MT+EKUDwMWLhHz3pybmY9YEy vCFG/SnEVbJb9yxV5uYCeNZTI0ekEncYcgbhvVRO+iKofY2lSZVNpoCyiHCTQw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666191366; 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=ANsy39dTo+95E1TXTBS5kbs28UVGSNMF6vh3Au875fs=; b=H1yntJDtD/aMwcZTAmUYG8IvP4HBmdfAyCl/OBYwZYBB8EKsYSv3K4Ea8bOP1qKbt6ZJ1i mxTyv7pllOslw7AQ== To: Petr Mladek <pmladek@suse.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org>, Steven Rostedt <rostedt@goodmis.org>, Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>, linux-efi@vger.kernel.org Subject: [PATCH printk v2 08/38] efi: earlycon: use console_is_enabled() Date: Wed, 19 Oct 2022 17:01:30 +0206 Message-Id: <20221019145600.1282823-9-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747129042593441761?= X-GMAIL-MSGID: =?utf-8?q?1747129042593441761?= |
Series |
reduce console_lock scope
|
|
Commit Message
John Ogness
Oct. 19, 2022, 2:55 p.m. UTC
Replace (console->flags & CON_ENABLED) usage with console_is_enabled().
Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
drivers/firmware/efi/earlycon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Wed, 19 Oct 2022 at 16:56, John Ogness <john.ogness@linutronix.de> wrote: > > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness <john.ogness@linutronix.de> Acked-by: Ard BIesheuvel <ardb@kernel.org> > --- > drivers/firmware/efi/earlycon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/firmware/efi/earlycon.c b/drivers/firmware/efi/earlycon.c > index a52236e11e5f..8c27eb941d8e 100644 > --- a/drivers/firmware/efi/earlycon.c > +++ b/drivers/firmware/efi/earlycon.c > @@ -30,7 +30,7 @@ static void *efi_fb; > static int __init efi_earlycon_remap_fb(void) > { > /* bail if there is no bootconsole or it has been disabled already */ > - if (!earlycon_console || !(earlycon_console->flags & CON_ENABLED)) > + if (!earlycon_console || !console_is_enabled(earlycon_console)) > return 0; > > efi_fb = memremap(fb_base, screen_info.lfb_size, > @@ -43,7 +43,7 @@ early_initcall(efi_earlycon_remap_fb); > static int __init efi_earlycon_unmap_fb(void) > { > /* unmap the bootconsole fb unless keep_bootcon has left it enabled */ > - if (efi_fb && !(earlycon_console->flags & CON_ENABLED)) > + if (efi_fb && !console_is_enabled(earlycon_console)) > memunmap(efi_fb); > return 0; > } > -- > 2.30.2 >
On Wed 2022-10-19 17:01:30, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Best Regards, Petr
diff --git a/drivers/firmware/efi/earlycon.c b/drivers/firmware/efi/earlycon.c index a52236e11e5f..8c27eb941d8e 100644 --- a/drivers/firmware/efi/earlycon.c +++ b/drivers/firmware/efi/earlycon.c @@ -30,7 +30,7 @@ static void *efi_fb; static int __init efi_earlycon_remap_fb(void) { /* bail if there is no bootconsole or it has been disabled already */ - if (!earlycon_console || !(earlycon_console->flags & CON_ENABLED)) + if (!earlycon_console || !console_is_enabled(earlycon_console)) return 0; efi_fb = memremap(fb_base, screen_info.lfb_size, @@ -43,7 +43,7 @@ early_initcall(efi_earlycon_remap_fb); static int __init efi_earlycon_unmap_fb(void) { /* unmap the bootconsole fb unless keep_bootcon has left it enabled */ - if (efi_fb && !(earlycon_console->flags & CON_ENABLED)) + if (efi_fb && !console_is_enabled(earlycon_console)) memunmap(efi_fb); return 0; }