From patchwork Tue May 16 20:15:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94919 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp681602vqo; Tue, 16 May 2023 13:25:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7qf2qPsHzJBSSx78Ej50JAkYg1Wk4KHUYQLCE1Ho/FbonEWjEcJ+gqCcfTlvCzLgc8Vq4r X-Received: by 2002:a17:902:70c9:b0:1ad:d1ab:9cc9 with SMTP id l9-20020a17090270c900b001add1ab9cc9mr16990226plt.12.1684268723323; Tue, 16 May 2023 13:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684268723; cv=none; d=google.com; s=arc-20160816; b=P8/BUMPhsRh/sCPTjLWyiKvh/w3Im81Gm6LLs6xxTQF5bEelT/f3SIK+VG6oLh4t08 jRaaxlcKjiMXgD62TmZXZa+uTLwdt/L7UH3VkD0FAXE/VNLGdIkwh9ziu+ap1WSjSlzo P95eLhesK6SfS1VYXn/xEI39WvPKi9t4BEo7BiXGqMkoXXsNkdTGgwlie8dOnjDSC3M9 0J3JEd3e9uqDQ41DdxQDLcrGYiAz9awkaZzJMS3T5j20PHo3RClLBmPzYg2Psgr/fuxc FijJPivhboxKKsTPoCD+ddX1NRxKq1juZLQ9UlfLwJA+032e8OWK7/XIezoXZWWtp7KB uP2w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=eikUCs8aIWEfF8lCPMLN1YlJnOmThCRAWtT0I1C+xCk=; b=QLCKkqIHEaS3FH6GI2vmZ1GhzdFiPJe/RMzNc6BpiFOpuBcIDT6JBmXYwxryIxLIoO 2CV+Wf9HgwKm5quXrYWsGIRnH74f2b6/M3pMRF7X5YzmqnnzzqFM8/Kq99HNn1fP9X4Z 3MBGglgmLfYSSY+EtkYYQCxrqevwZcLH80Eo8W1nsGhTo3XOozGN6Dc2jqlap6hSYXul B1nRuAspDTOaKAXv7gjXb86TdEnnxwc/3c4w5qWKy0ylms5rVW2tZkovpO/zs9mRgeUY iL9MyfplYMwPSuHVYzqmcgS3XMbn5d2vEu14cJRPLCuqj6WlcsASeSqOlB2x851PVYO8 5uyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t19K1nVX; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a17090332cc00b001a59439dbfesi20371247plr.529.2023.05.16.13.25.07; Tue, 16 May 2023 13:25:23 -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=t19K1nVX; 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 S229666AbjEPUQt (ORCPT + 99 others); Tue, 16 May 2023 16:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230091AbjEPUQq (ORCPT ); Tue, 16 May 2023 16:16:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B3C783D7; Tue, 16 May 2023 13:16:31 -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 889B963392; Tue, 16 May 2023 20:16:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A333CC433EF; Tue, 16 May 2023 20:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684268171; bh=N+1VABhJvTi16EIISsnGXu9W13DA9iY+3UrCLsFbrYY=; h=From:To:Cc:Subject:Date:From; b=t19K1nVXAx9OpeFXlSmZsQDdECWADsocz3wrgG8N9x6Wz0NAMiB7fzeURdmRxqiVC FE07TPRZZcZAPdvPFhoTWSzINBENNhKzBzB6Xq7FKG8jIaFY6g3hy4tL5oLOfdeTHT 7z8CANiro6EyUa/5l116M79aITVKsu59d8uRuPY4LU42GnbOsuFeh7zo6K7b6seC/L GMZxjfUZoUNcRnj3VvN811MURLbXR/EK+lXIRxmhYJspg5W8LM9Y3imPIQVelufs4w cQIjA6Bkdsi6bkRjcf7xerYlb95bhphxg0UsRIAlbbqHYisiiuK8M7FkvxSnyRuieu jfLdta26ci6tw== From: Arnd Bergmann To: Ard Biesheuvel Cc: Arnd Bergmann , Jonathan Cameron , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] efi: fix missing prototype warnings Date: Tue, 16 May 2023 22:15:43 +0200 Message-Id: <20230516201606.557548-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766083761036334320?= X-GMAIL-MSGID: =?utf-8?q?1766083761036334320?= From: Arnd Bergmann The cper.c file needs to include an extra header, and efi_zboot_entry needs an extern declaration to avoid these 'make W=1' warnings: drivers/firmware/efi/libstub/zboot.c:65:1: error: no previous prototype for 'efi_zboot_entry' [-Werror=missing-prototypes] drivers/firmware/efi/efi.c:176:16: error: no previous prototype for 'efi_attr_is_visible' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:626:6: error: no previous prototype for 'cper_estatus_print' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:649:5: error: no previous prototype for 'cper_estatus_check_header' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:662:5: error: no previous prototype for 'cper_estatus_check' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- drivers/firmware/efi/cper.c | 1 + drivers/firmware/efi/libstub/efistub.h | 3 +++ include/linux/efi.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c index 35c37f667781..75715c7be34a 100644 --- a/drivers/firmware/efi/cper.c +++ b/drivers/firmware/efi/cper.c @@ -25,6 +25,7 @@ #include #include #include "cper_cxl.h" +#include "../../acpi/apei/apei-internal.h" /* * CPER record ID need to be unique even after reboot, because record diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h index 67d5a20802e0..54a2822cae77 100644 --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h @@ -1133,4 +1133,7 @@ const u8 *__efi_get_smbios_string(const struct efi_smbios_record *record, void efi_remap_image(unsigned long image_base, unsigned alloc_size, unsigned long code_size); +asmlinkage efi_status_t __efiapi +efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab); + #endif diff --git a/include/linux/efi.h b/include/linux/efi.h index 7aa62c92185f..571d1a6e1b74 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1338,4 +1338,6 @@ bool efi_config_table_is_usable(const efi_guid_t *guid, unsigned long table) return xen_efi_config_table_is_usable(guid, table); } +umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n); + #endif /* _LINUX_EFI_H */