Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4754912rwb; Tue, 17 Jan 2023 05:13:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXtKZgRJUIoTbcolMOQJcoJUWR8WnTjXB1XpZybJM2s100uEyLAWlkVreilZOWoOhHwL92xc X-Received: by 2002:a17:907:b610:b0:7c0:d23c:ead3 with SMTP id vl16-20020a170907b61000b007c0d23cead3mr3471606ejc.27.1673961214716; Tue, 17 Jan 2023 05:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673961214; cv=none; d=google.com; s=arc-20160816; b=VTISlueoRrQRIAB3LCsKwTXTgeDhNou/bSVgLgsUXRANoYUf6YEpm21BO8T6mPzQRl +YcvYqeseueegzEjHlWQoShJgsNaLY8O6dBb0zzn4Is0rPWF1mrBugjdfkntGw7r+uJD /qGntx3SrlQCxeAPKPYT8W+GBhBvXb6/6CNPMKUzEX2BGCmM1FkQzqdbdF9EjU/iNaik oWnmx4TPM9t3Hf+jHhlU2bImIBFcMA5u5jnY0AUTqEooC5wA12ln+zoL8xTmhvX/c19Q 58wH/XyLMr8hbrIjcleTPGPmqIzjgtWOZDNVtB8IXWeIdiirvj/0C0rMKvCytHEMljT0 8Lmw== 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:from :dkim-signature; bh=zZnP5i2IbDZWR96z3Aa/r0fI/XRgWDSDX+Jea7YQ+t4=; b=w2Myk7JEBVg1m28TKS9auOBpDLsZYMnki7QFQN7HyU45Ev3udRnaEowrwimmFgAfM2 9OdcHsyAWsTlbSBCC57mEv0voyfpxunvCU8JBqvR3o8waleC+R5NnyhslWpKRXY8wt0g qLISNdawBtT0ztu0/f3MNRq3KGAgDb/oxKhoG7vNmMzZ36Fy1ICUUmOJZan2aGds4NLG lI7YiLBRL5jVCpA8kQLbR7ZCGGkKNJ2HFjC4LFtf66GZeV77f9mnpDj4YJbVc9Tueoh+ NQZRWesZ7lAvQ/jHIEYdvTW+EYQZK/x2A25M045Z3d51RrdsgtP1xaBhMnhfdCbzUhKO R6tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dIzQDTNa; 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 xa5-20020a170906fd8500b0084d43aadb70si25278362ejb.127.2023.01.17.05.13.22; Tue, 17 Jan 2023 05:13:34 -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=@kernel.org header.s=k20201202 header.b=dIzQDTNa; 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 S236398AbjAQMq1 (ORCPT + 48 others); Tue, 17 Jan 2023 07:46:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236744AbjAQMqK (ORCPT ); Tue, 17 Jan 2023 07:46:10 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A37321207F; Tue, 17 Jan 2023 04:46:00 -0800 (PST) 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 3E9A061333; Tue, 17 Jan 2023 12:46:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C23AC433F1; Tue, 17 Jan 2023 12:45:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673959559; bh=R4MUqRfYUuD7hD15Z2VAffe0lvOKWbQwgywpMdRQ0Y8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dIzQDTNa2+d8GV2wAYso+GyeWBDaiFO4GQ8XNuZOAN7CC2NlmKSz+Dgy0ITBFYGso oN+yWT3CYO3ELix6rt/nMBT+zBiFu3Qc/sUwWbPJY3mRs3xmqxpDjtw463FH8ild2d Rvit2N5RRjsRH16lsnWge6QOvTAwgMgrtJQPaW3k/z4KgKBHcZ6mrpleIul8liwbVO KK5QPL5vsk75Va/Hm8idpXY32nYLKMEMwSsra4fbq7O1b2EszayTZDGvQseiZIqebW Hyqdwovkz1V803neN10xbWWrbC/GrNoeyLjqRFOdU+T7oCBpphDePF8Jvw3zGVwoGI VCX9qWuxlDX0g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pHlM5-0004Mp-JV; Tue, 17 Jan 2023 13:46:21 +0100 From: Johan Hovold To: Ard Biesheuvel Cc: Matthew Garrett , Jeremy Kerr , Maximilian Luz , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/2] efi: efivars: make efivar_supports_writes() return bool Date: Tue, 17 Jan 2023 13:43:10 +0100 Message-Id: <20230117124310.16594-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.38.2 In-Reply-To: <20230117124310.16594-1-johan+linaro@kernel.org> References: <20230117124310.16594-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 For consistency with the new efivar_is_available() function, change the return type of efivar_supports_writes() to bool. Signed-off-by: Johan Hovold --- drivers/firmware/efi/vars.c | 2 +- include/linux/efi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c index d6b2c4f9a575..aa5ba38f81ff 100644 --- a/drivers/firmware/efi/vars.c +++ b/drivers/firmware/efi/vars.c @@ -110,7 +110,7 @@ int efivars_unregister(struct efivars *efivars) } EXPORT_SYMBOL_GPL(efivars_unregister); -int efivar_supports_writes(void) +bool efivar_supports_writes(void) { return __efivars && __efivars->ops->set_variable; } diff --git a/include/linux/efi.h b/include/linux/efi.h index 2124e55c02d6..f6b107da1cbc 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1061,7 +1061,7 @@ bool efivar_is_available(void); static inline bool efivar_is_available(void) { return false; } #endif -int efivar_supports_writes(void); +bool efivar_supports_writes(void); int efivar_lock(void); int efivar_trylock(void); -- 2.38.2