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__ */ From patchwork Tue May 16 20:14:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp682413vqo; Tue, 16 May 2023 13:27:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4sBWtzB+Xn6OEJjraHYamHez03Jc9DxVXdvuS2dJN7xDJa61fz9qkgwONgVIW0LlXm3e/c X-Received: by 2002:a17:902:d4c9:b0:1ac:6c46:8c80 with SMTP id o9-20020a170902d4c900b001ac6c468c80mr41427782plg.53.1684268842778; Tue, 16 May 2023 13:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684268842; cv=none; d=google.com; s=arc-20160816; b=Gs2mzr3xTxuvc+EBcYWUVSvKXyxdKK048uLZWzVEkUaKHpMSivVsNcaiJiXcqwRIsh kDg+ReDdqOtJd9rn8d59nALquOBcleWQqnY4hczzzoGz+nBa0LhGem8d77Usy6hYjmL9 vSA65VuQqwH8Oa2Ux6xJ47WkdIi2iGtCGSa+NEA9rmNWIkSL4KO/awoWdbVvDz+DtpqF xxgwY3nahVWGTNnfQ8NEJ66/M6rYRI/oEmIExg1c7Hk3wvRCjtdaSjC5jHmrlWUlUO9+ e7l5WOPS+J965RJ7Xj/5+k3/ainSf31i1Q0bw39v+HRAC2k0mvpqDAWHo8aaLexyCdkB lT1g== 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=wfV3DnsxuzSw+w9ml475hVTxCn/qZdr9oiyWxuqkup8=; b=epznGypp1kG+79PyyeNgb3rynMBxfVbJtyFyRo3HUhTd4khg8faUQnjdRLo5uTOlTw IR1cc2JYqSD+DKBN4tolCuV7cfQJqHwXj2PQlS5q76yNZdA4T7OkrnuDLK5EAnV6y9gv mj+tZ9qcBTGBxnUZMAwimjj5JYnLRFsPAEv6Tkf4l5JsqbyDg33AymPqWUF4X6CB0ycQ lsT7kqZAMO843vjnmzm6NPt+sgIiciuD0rw7Qs2Ipo2BybsZ1i8pmx6WFZ7M1jhmmoHw kt+v+yz5o3qwr4XtMtXCTKZaKBwkF+fjMPBNW9ueuJjK9TZx5K1AFFyT88lRC/0OZdBk KMcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QJhVpmF7; 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 h13-20020a170902680d00b001a6556cf95esi14415270plk.170.2023.05.16.13.27.07; Tue, 16 May 2023 13:27:22 -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=QJhVpmF7; 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 S230116AbjEPUPA (ORCPT + 99 others); Tue, 16 May 2023 16:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbjEPUOk (ORCPT ); Tue, 16 May 2023 16:14:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87DD093EF for ; Tue, 16 May 2023 13:14:30 -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 98CD863D84 for ; Tue, 16 May 2023 20:14:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D8BEC4339B; Tue, 16 May 2023 20:14:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684268068; bh=PfWI5pbJLZYncl+Uo6KbeVi/opEdg9bkbTtIghw9SQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QJhVpmF7i5EW9Rx91r0FCizTscPDtZJ2GimQp9BDPWVGJjWI9gn4hV+hANYa6uiBZ XJ/xGSFfu+9umO4u/v17A4PBEiZk3Rzw95MFryBG84s8n0UI5ZABt0LpwavqgTe7EN Kr6ssHGMwPwMDktHuTY29kS+mkjRJrLZFeT4DqqZFsTFWL/TvKObYA2XRWgo6jJSXk TAgey6/16PDmWVlaoAt60wVwdZQ0FV5Ui54FMKnbCJ3HJhNv3K0c7r0vn1rbhQTDp+ doJWYBDzvX9B5mXV2oPW2v9hRn1rd8cSpkSJY41m3AzzZaoZMIcTNF0jU1e+ZD9aRH Fv+DPoZS8SoPw== From: Arnd Bergmann To: Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny Cc: Arnd Bergmann , nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] testing: nvdimm: add missing prototypes for wrapped functions Date: Tue, 16 May 2023 22:14:08 +0200 Message-Id: <20230516201415.556858-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516201415.556858-1-arnd@kernel.org> References: <20230516201415.556858-1-arnd@kernel.org> 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?1766083886084934913?= X-GMAIL-MSGID: =?utf-8?q?1766083886084934913?= From: Arnd Bergmann The nvdimm test wraps a number of API functions, but these functions don't have a prototype in a header because they are all called by a different name: drivers/nvdimm/../../tools/testing/nvdimm/test/iomap.c:74:15: error: no previous prototype for '__wrap_devm_ioremap' [-Werror=missing-prototypes] 74 | void __iomem *__wrap_devm_ioremap(struct device *dev, | ^~~~~~~~~~~~~~~~~~~ drivers/nvdimm/../../tools/testing/nvdimm/test/iomap.c:86:7: error: no previous prototype for '__wrap_devm_memremap' [-Werror=missing-prototypes] 86 | void *__wrap_devm_memremap(struct device *dev, resource_size_t offset, | ^~~~~~~~~~~~~~~~~~~~ ... Add prototypes to avoid the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Dave Jiang --- tools/testing/nvdimm/test/nfit_test.h | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tools/testing/nvdimm/test/nfit_test.h b/tools/testing/nvdimm/test/nfit_test.h index b5f7a996c4d0..b00583d1eace 100644 --- a/tools/testing/nvdimm/test/nfit_test.h +++ b/tools/testing/nvdimm/test/nfit_test.h @@ -207,7 +207,36 @@ typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t); typedef union acpi_object *(*nfit_test_evaluate_dsm_fn)(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4); +void __iomem *__wrap_devm_ioremap(struct device *dev, + resource_size_t offset, unsigned long size); +void *__wrap_devm_memremap(struct device *dev, resource_size_t offset, + size_t size, unsigned long flags); +void *__wrap_devm_memremap_pages(struct device *dev, struct dev_pagemap *pgmap); +pfn_t __wrap_phys_to_pfn_t(phys_addr_t addr, unsigned long flags); +void *__wrap_memremap(resource_size_t offset, size_t size, + unsigned long flags); +void __wrap_devm_memunmap(struct device *dev, void *addr); +void __iomem *__wrap_ioremap(resource_size_t offset, unsigned long size); +void __iomem *__wrap_ioremap_wc(resource_size_t offset, unsigned long size); void __wrap_iounmap(volatile void __iomem *addr); +void __wrap_memunmap(void *addr); +struct resource *__wrap___request_region(struct resource *parent, + resource_size_t start, resource_size_t n, const char *name, + int flags); +int __wrap_insert_resource(struct resource *parent, struct resource *res); +int __wrap_remove_resource(struct resource *res); +struct resource *__wrap___devm_request_region(struct device *dev, + struct resource *parent, resource_size_t start, + resource_size_t n, const char *name); +void __wrap___release_region(struct resource *parent, resource_size_t start, + resource_size_t n); +void __wrap___devm_release_region(struct device *dev, struct resource *parent, + resource_size_t start, resource_size_t n); +acpi_status __wrap_acpi_evaluate_object(acpi_handle handle, acpi_string path, + struct acpi_object_list *p, struct acpi_buffer *buf); +union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, + u64 rev, u64 func, union acpi_object *argv4); + void nfit_test_setup(nfit_test_lookup_fn lookup, nfit_test_evaluate_dsm_fn evaluate); void nfit_test_teardown(void); From patchwork Tue May 16 20:14:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94930 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp682748vqo; Tue, 16 May 2023 13:28:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4435rmOnJqIGiq3z5QnZXAMrM1v7QfYbAc8DUM6e+eiBMZNeLLpyKzOdgeMOwdTgKcDuP/ X-Received: by 2002:a05:6a20:9189:b0:106:ff3c:a60d with SMTP id v9-20020a056a20918900b00106ff3ca60dmr3810937pzd.38.1684268895157; Tue, 16 May 2023 13:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684268895; cv=none; d=google.com; s=arc-20160816; b=bwNErrYxSeAeDH2LXvJxvwhBP6Ijwxz+TNVRw7CccEr+j2v330b83aN6JHBF7L1irE /PxqdBy022bQVjWfDuGeaw2YdMYWEufI5RnFSAfYsSW1hQcYkKgH3lmf4LrwywavFd7g kt4vi1yJaO4iyGc2pPOvtaVkPxH0bUEEG6ZFzrQgrccSKWak+mpoXlqrdoZlUcgt0BB3 EQKKxRjJEBmTVScXDGAB7ZplwqtbVhJEyEptqBsCY25ghdJBB4GBMyHsGLPuIwoQt29J d0Wj+DDKC6zh0Wf8xEowyCSGJHQuvd8NwNIhk5FrJrzn85jbaS1kIgT8bBlcXvTS5ltZ B1Bg== 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=XB6N+r412V3Dq1rl81E0nMZVd7rv6dLMvHetVMLJQ3I=; b=WdeYC920YOT1EOQ8WR1IIbK5uuvIGebISSFv4e8eyUiGhZ7VbxHJRoJxXqMLHpthsA 1Ui+5q6N/NNdOks4tYOIQYHaDV9OJAOGg2kUvXEce051wIebeaNjGEt8F54lgjgmU1A2 dgPjEHqTqMXxDeGX79XRIPs/k0kspXlS2efcxuL7x3wBte8ZLPUamhPRn7qAX67LQiwS 2uxXeVQivIR892ZIAbCDczrKEaUnh3gVeSWv9/OPV8DONINnT+/sC4rmJ7qPy5bi+BRU 8DPts0Gk4B8ZeKPhoWILX7VyuWbfalAIFiFFORfHdqhJu9rzyeeRToQDMLN1LL2h/cL4 n7MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PuJ537HF; 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 r14-20020a17090b050e00b0025004bcf6casi35509pjz.4.2023.05.16.13.28.00; Tue, 16 May 2023 13:28: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=@kernel.org header.s=k20201202 header.b=PuJ537HF; 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 S230469AbjEPUPK (ORCPT + 99 others); Tue, 16 May 2023 16:15:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231137AbjEPUO4 (ORCPT ); Tue, 16 May 2023 16:14:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADEA97D9C for ; Tue, 16 May 2023 13:14:38 -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 5174E63D91 for ; Tue, 16 May 2023 20:14:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FCBDC433A0; Tue, 16 May 2023 20:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684268076; bh=6CLuxrIav2439MrPgOxLsybmU0ZxykMENHio5PB5Xks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PuJ537HFxfcwhdqwCP8FY0Iz+JnIIEcw+QdKeU4PnmNDYL/WVfrqMMCxzuIZ6eXCs 3f9dFRNu/A3vXHLgWDe5fvmcRFazgvPMJo+AD0Agor6XUqgoQaPRbLe+Gy3Mvodwvq yZWJh8hpJ2gWwW6Y/LeKSuaYs/6IsH6gxZFhKZnr6dp4c4qK3YEmwu9aymaHj/B9NX p1TIc26HTglrtf9u5RrYB3Fwv9sY0cYNgsigJyLYbqpNN6Wnyjkxo6MFKtzk3Ednsx DWOVIRLCVNHJesogc+ASjuUbKgnQW1B874rgEDwlKV8PWSdMWeLKtBBRwbtmC4Qm99 uhmZKCIs1NFeA== From: Arnd Bergmann To: Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , Jonathan Cameron Cc: Arnd Bergmann , Greg Kroah-Hartman , Hans de Goede , nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] libnvdimm: mark 'security_show' static again Date: Tue, 16 May 2023 22:14:09 +0200 Message-Id: <20230516201415.556858-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516201415.556858-1-arnd@kernel.org> References: <20230516201415.556858-1-arnd@kernel.org> 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?1766083940587297767?= X-GMAIL-MSGID: =?utf-8?q?1766083940587297767?= From: Arnd Bergmann The security_show() function was made global and __weak at some point to allow overriding it. The override was removed later, but it remains global, which causes a warning about the missing declaration: drivers/nvdimm/dimm_devs.c:352:9: error: no previous prototype for 'security_show' This is also not an appropriate name for a global symbol in the kernel, so just make it static again. Fixes: 15a8348707ff ("libnvdimm: Introduce CONFIG_NVDIMM_SECURITY_TEST flag") Signed-off-by: Arnd Bergmann Reviewed-by: Dave Jiang --- drivers/nvdimm/dimm_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c index 957f7c3d17ba..10c3cb6a574a 100644 --- a/drivers/nvdimm/dimm_devs.c +++ b/drivers/nvdimm/dimm_devs.c @@ -349,7 +349,7 @@ static ssize_t available_slots_show(struct device *dev, } static DEVICE_ATTR_RO(available_slots); -ssize_t security_show(struct device *dev, +static ssize_t security_show(struct device *dev, struct device_attribute *attr, char *buf) { struct nvdimm *nvdimm = to_nvdimm(dev);