diff mbox series

[-next,v2] tools/testing/nvdimm: Make symbol '__nfit_test_ioremap' static

Message ID 1618904867-25275-1-git-send-email-zou_wei@huawei.com (mailing list archive)
State Accepted
Commit 7ddb4cc2b885c740523e6ea54a1f4434acfa3368
Headers show
Series [-next,v2] tools/testing/nvdimm: Make symbol '__nfit_test_ioremap' static | expand

Commit Message

Zou Wei April 20, 2021, 7:47 a.m. UTC
The sparse tool complains as follows:

tools/testing/nvdimm/test/iomap.c:65:14: warning:
 symbol '__nfit_test_ioremap' was not declared. Should it be static?

This symbol is not used outside of iomap.c, so this
commit marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 tools/testing/nvdimm/test/iomap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dan Williams April 20, 2021, 11:58 p.m. UTC | #1
On Tue, Apr 20, 2021 at 12:31 AM Zou Wei <zou_wei@huawei.com> wrote:
>
> The sparse tool complains as follows:
>
> tools/testing/nvdimm/test/iomap.c:65:14: warning:
>  symbol '__nfit_test_ioremap' was not declared. Should it be static?
>
> This symbol is not used outside of iomap.c, so this
> commit marks it static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>

Looks good to me, thanks.
diff mbox series

Patch

diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c
index c62d372..ed563bd 100644
--- a/tools/testing/nvdimm/test/iomap.c
+++ b/tools/testing/nvdimm/test/iomap.c
@@ -62,7 +62,7 @@  struct nfit_test_resource *get_nfit_res(resource_size_t resource)
 }
 EXPORT_SYMBOL(get_nfit_res);
 
-void __iomem *__nfit_test_ioremap(resource_size_t offset, unsigned long size,
+static void __iomem *__nfit_test_ioremap(resource_size_t offset, unsigned long size,
 		void __iomem *(*fallback_fn)(resource_size_t, unsigned long))
 {
 	struct nfit_test_resource *nfit_res = get_nfit_res(offset);