From 8a471e908873fd3e3f5e8de60afe02fbc519a7cf Mon Sep 17 00:00:00 2001 From: Surbhi Singh Date: Fri, 30 Aug 2024 08:55:37 +0000 Subject: [PATCH] video: tegra: nvmap: Make function static Fix for: Sparse defects Sparse defect stated that "symbol 'debug_free_size_fops' was not declared. Should it be static?" -Since carveouts also have free_size debugfs and it is directly using the field from heap struct. -So to make free_size_fops static we are changing DEBUGFS_OPEN_FOPS to DEBUGFS_OPEN_FOPS_STATIC Bug 4513982 Change-Id: I296bf95a421a9c751cc11266a896d2806bfc82b4 Signed-off-by: Surbhi Singh Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3205061 Reviewed-by: Ketan Patil GVS: buildbot_gerritrpt Reviewed-by: Pritesh Raithatha --- drivers/video/tegra/nvmap/nvmap_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index 9afcb6e6..563c2a77 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -877,7 +877,7 @@ static int nvmap_debug_free_size_show(struct seq_file *s, void *unused) seq_printf(s, "Max allocatable IOVMM memory: %lu bytes\n", free_mem); return 0; } -DEBUGFS_OPEN_FOPS(free_size); +DEBUGFS_OPEN_FOPS_STATIC(free_size); #ifdef NVMAP_CONFIG_DEBUG_MAPS static int nvmap_debug_device_list_show(struct seq_file *s, void *unused)