Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1203290rwd; Tue, 16 May 2023 13:25:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KuBqIIzIuvPEGNcS+BPOm9FDeCLLVHnAXjKfFJbooZyqqtgPV17s93AkmtNwdmIUEdVYZ X-Received: by 2002:a05:6a00:14d0:b0:63d:2f13:1f3 with SMTP id w16-20020a056a0014d000b0063d2f1301f3mr52744624pfu.33.1684268755070; Tue, 16 May 2023 13:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684268755; cv=none; d=google.com; s=arc-20160816; b=RFM9kmgoIREshTaJd4VUAwSogKGw2zixm70xz4536VlafHdlq0Zq+pw1Y012rv6rqt VSy1OUMu6ThYZJ7jm04jOugmTTY6ZEKie61izH7PDWpUKPb0Njt8QIx1A0uj4cgCdTFb U7ehxfM9SzcNN13HiVvZvsO+B3E2qSHHWLm9oCaYnYQBsH967qeMdIg8MqeHC2vJIMW1 Ag18OuDPkHCqEJX72ROmQJb1hZHywmj349HuPUBG6X0eD+hI3uKD22AwhJZFvzXP/qgb /EhlVP5+6kENquadj12y9TV7SUzM+ieldDpF8GSbDlN8gl7flsIFnGbUlWqE8VWi/X+N iLYg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c83-20020a624e56000000b0063d2b810fc6si20740476pfb.305.2023.05.16.13.25.40; Tue, 16 May 2023 13:25:55 -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 S229985AbjEPUPA (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 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,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 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 --- 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); -- 2.39.2