Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1308121rwi; Wed, 19 Oct 2022 09:03:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7XRX+vMgZN/k16Pjbw7xFTTFQ176tmHgPbBSp42cYT99EnFyfPBe7oswK3NT31tBhEb2wx X-Received: by 2002:a17:907:86a9:b0:78d:f741:7fa0 with SMTP id qa41-20020a17090786a900b0078df7417fa0mr7289021ejc.734.1666195425409; Wed, 19 Oct 2022 09:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666195425; cv=none; d=google.com; s=arc-20160816; b=QZpi1edZtS8t+zEHoRAbHWO0WnYBKcApQ2UKueB5ZP8BeGh4yULzDUVKaKZ1dCeSOj rs5O23jjXki6VTWtGCdN6dLn0V7NcH8mYc7CThhaYPoBrBMPUU4jBpKND0bBjqQXBGBb x3oEIoUf5irjxEUgnh87nc0TdeBiFSSLxTYZ73/PuoPLe1rqzaGFYywnzArgSVnzg+sZ WKEbvSpM+cAFqtMO7yKj1wn9KTGDlOPqhwQV534soE2KMjCmrVjP3h9y7FheLSXRk8Tq jp+fJ5qcUa3+V4TcTPGfMXWgRUaVBfEzeku+1105kY5HBjYCtvyC1ZllTSliiLxnAQ+Y j5Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3v8zmkzMuKbxZ3ddXT2FfYMg5dNo0MmcrMPdWdt3vBM=; b=cjhhHKcWfHoC/w1/WnDDrZUXtC2F2Bc7XPXT2T84P9RF4dpuhyGGqAUegAHoi2rTtJ 3SSNEp/0XTQBG3U6NNzXw7XNrNmbN5s6j4SZdc0maf5xjNrxD+O79vbCH+mwoOwcxA// 71/eLIkbVRRhrJ4AEPHGnPDYd3zC5HFmVw8lG0OEObP7vIsc5cKQDZTGeHYJsPZzUZpP mLapyCyYwDYx/k6U4u9wOAY/BCBP1TeDv2/wpi0gykfe3RBM8k8zRQOeBItgahEIy8Yb UDINy+hpo2Xk7Gz3+LfRJRnAzDciOp4YUOtBNl78Je8/+vu70ZL9jLJDZGpL1/H1GIUA 6O6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cIiBukaf; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd12-20020a170906b34c00b0073d7111c8e7si11685896ejb.710.2022.10.19.09.02.53; Wed, 19 Oct 2022 09:03:45 -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=@kernel.org header.s=k20201202 header.b=cIiBukaf; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230492AbiJSPiM (ORCPT + 99 others); Wed, 19 Oct 2022 11:38:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbiJSPhw (ORCPT ); Wed, 19 Oct 2022 11:37:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25697159945; Wed, 19 Oct 2022 08:34:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C1E8861919; Wed, 19 Oct 2022 15:32:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37FCFC4347C; Wed, 19 Oct 2022 15:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666193555; bh=kji4rxqvRz+Go/DtMe396VRJ+YBbpbvKDQh/TscxArg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cIiBukafmleVCO6ydm6mLjVQgp9k6gwAwPDpZWrxpMSdnNcm+pq/9DS3/7aO1+HFX uxcjqxFt5e0QzjQOlj5lJsHSH982yKz1xBrm7zEwRyyKOC7osI3RO0WTikfUIgr2/6 iZpqxDQuQvIpJxSN/+Wp7DxG3co+pBfD828bfft9q9PzHmqnQgdcE05igZAkYLHZjB 3qmYUXKg9P0fmEOKV90QL1i5nD0ZfMp+0bLJVjNDiiNZ53PwHvXmA1w/ixpA7ZnkOl tWRkqvXCoI3T1Dh1o4E1m2QbHQVWFW8G9NBABQV8YhZHQ2d59i+sd9RpGM5hQ/ti9x GkhlfNvQRnTgw== Received: by mail-lj1-f173.google.com with SMTP id b18so22642660ljr.13; Wed, 19 Oct 2022 08:32:35 -0700 (PDT) X-Gm-Message-State: ACrzQf3b4+F83JUabWlQmJ1dEVEq4Mlljq1L3WH0kbiJEz/5yAFdEbEN rDgWFwXh/6gx+O2yObq4mkSZAYJ3UEfrK3WdfL0= X-Received: by 2002:a05:651c:1590:b0:26c:4311:9b84 with SMTP id h16-20020a05651c159000b0026c43119b84mr3365582ljq.152.1666193553169; Wed, 19 Oct 2022 08:32:33 -0700 (PDT) MIME-Version: 1.0 References: <20221019145600.1282823-1-john.ogness@linutronix.de> <20221019145600.1282823-9-john.ogness@linutronix.de> In-Reply-To: <20221019145600.1282823-9-john.ogness@linutronix.de> From: Ard Biesheuvel Date: Wed, 19 Oct 2022 17:32:22 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH printk v2 08/38] efi: earlycon: use console_is_enabled() To: John Ogness Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Wed, 19 Oct 2022 at 16:56, John Ogness wrote: > > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness Acked-by: Ard BIesheuvel > --- > 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 >