From patchwork Tue May 16 20:14:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94918 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp679180vqo; Tue, 16 May 2023 13:19:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74ypgtvmBgyCbCaAISLjUKJblYwV4eFF/FOCx5XGs/xYMG/ErbAjvCiacCjQGanloBGk1Q X-Received: by 2002:a17:90b:1c92:b0:253:1ec9:ecd6 with SMTP id oo18-20020a17090b1c9200b002531ec9ecd6mr2923383pjb.42.1684268379438; Tue, 16 May 2023 13:19:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684268379; cv=none; d=google.com; s=arc-20160816; b=Muv4lbFaEIWZpK3981+za7/c/r4pTPeKedl4ITU71WMrOhwOo6h4l0f7EODh7QDWoV 0TxPESiENq9vVTpzYPVD5GOP4fJo78LYH+YufmJhY/W1RUVBwS9j0AMBMnz86ZfguLAu jDcLzF3py33zLfWtW2NC3ujG9RceOkRLRIq0aBjybCOyzi/Zre8AFrNsWz2g84iwIv53 Cdir/oHH4rbJ+m2MB9C6ELPdfqkfgI1i26xnmI+AZjxuZnDrkb86kzLJnQlLuYKjq/PY mme1qPiGvBgImKDiVblDAJFTwtEZSq21zdLcwcXCg0n3DNp6BrOHikfU34w9ymvWLQVZ GDqw== 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=43BqQ+D2LIfv3UgFSeSe2yBFft0rnJek4QT8HvGQXC8=; b=TKaXatMU7Ascv/XlKBOj7H7UznS0nm2AHh9PHkHczKVNaUNZMqsTvJuXY/c41vBbCY KiqRG1FV7iVLnmoYScN73H2gWnG6XOx6EGB4Bd5jqNzQFtbpx9KopXtnn17dH1oGT3Ua IySFdkKgy0AVeavYUz6O8M1vgKB0gRP3MG4fMI28rEHtcCeLvgZ1csqRGuoogzi3Caym ypPxzz457LpWxhmscrKV4fjVTP82A/SO7S2guGeKbSWS9QDV2aSQ+nUeYvi55PVkGyxP nTW6agfvL3/akplIvvMDPnbRlkj+HiRXWXIhQRZskX+xZsLQmC2eZCvmc7YnrqR8cqms 9K5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OM32YbEU; 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 i189-20020a636dc6000000b0051b4eaac57esi19657079pgc.583.2023.05.16.13.19.24; Tue, 16 May 2023 13:19:39 -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=OM32YbEU; 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 S230028AbjEPUO0 (ORCPT + 99 others); Tue, 16 May 2023 16:14:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230187AbjEPUOX (ORCPT ); Tue, 16 May 2023 16:14:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE0137A8F; Tue, 16 May 2023 13:14:22 -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 5104F63884; Tue, 16 May 2023 20:14:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 732D4C433D2; Tue, 16 May 2023 20:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684268061; bh=foQZo0SMEEOSfOdU0XLlammV/Ut/rproT2TVSSLaIUk=; h=From:To:Cc:Subject:Date:From; b=OM32YbEUQC5xVxtE0YnqTboB3+rRk0HRaUEGVOOJ6CQ2+Xf9Ikx8Q/laibk1Wk/r5 zQtmUYJ75+J76otp5VRLXteHm89654iO8R6rWKS5KxYFlzpQOkplskfGmZjtJa2xDk norKmHvyyTC15SHkhEv2YPqslSB9xpHsqG+z+k4WS719hGcO4cSuOSz6B4jtcCC+P6 LjLfNHcARYJD1QoI9T6NFZvpCNF1CrhweY/gjT6PpXfY+5tkTiaK/mBaVyGQTbVijY kvpHyzXPwM2L5Muj3Oqwv6J2d7X6o/wiEKDpW0g9oEFSIofNWdss8e7a6k5QofBdnT nK8gDBJcEL6QQ== From: Arnd Bergmann To: Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , "Rafael J. Wysocki" Cc: Arnd Bergmann , Len Brown , nvdimm@lists.linux.dev, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] acpi: nfit: add declaration in a local header Date: Tue, 16 May 2023 22:14:07 +0200 Message-Id: <20230516201415.556858-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1766083400303809333?= X-GMAIL-MSGID: =?utf-8?q?1766083400303809333?= From: Arnd Bergmann The nfit_intel_shutdown_status() function has a __weak defintion in nfit.c and an override in acpi_nfit_test.c for testing purposes. This works without an extern declaration, but causes a W=1 build warning: drivers/acpi/nfit/core.c:1717:13: error: no previous prototype for 'nfit_intel_shutdown_status' [-Werror=missing-prototypes] Add a declaration in a header that gets included from both sides to shut up the warning and ensure that the prototypes actually match. Signed-off-by: Arnd Bergmann Reviewed-by: Dave Jiang --- drivers/acpi/nfit/nfit.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h index 6023ad61831a..573bc0de2990 100644 --- a/drivers/acpi/nfit/nfit.h +++ b/drivers/acpi/nfit/nfit.h @@ -347,4 +347,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev); bool intel_fwa_supported(struct nvdimm_bus *nvdimm_bus); extern struct device_attribute dev_attr_firmware_activate_noidle; +void nfit_intel_shutdown_status(struct nfit_mem *nfit_mem); + #endif /* __NFIT_H__ */