From 4ea9ca5d30a25897e4f03d19e5ce5325f8ecc4aa Mon Sep 17 00:00:00 2001 From: Surbhi Singh Date: Tue, 4 Feb 2025 10:19:25 +0000 Subject: [PATCH] video: tegra: nvmap: Make function static. Fix for: Sparse defects Sparse stated that: -symbol 'tegra_vpr1_dev' was not declared. Should it be static? -symbol 'tegra_vpr_cma_dev' was not declared. Should it be static? -symbol 'tegra_generic_cma_dev' was not declared. Should it be static? -symbol 'tegra_vpr_dev' was not declared. Should it be static? -symbol 'tegra_generic_dev' was not declared. Should it be static? Making all the above functions static since it is being used in nvmap_init.c only. Bug 4513982 Change-Id: I4887d994d9ae852a4faa7da735c18d25b393187a Signed-off-by: Surbhi Singh Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295831 Reviewed-by: Pritesh Raithatha GVS: buildbot_gerritrpt --- drivers/video/tegra/nvmap/nvmap_init.c | 12 ++++++------ include/linux/platform/tegra/common.h | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/video/tegra/nvmap/nvmap_init.c b/drivers/video/tegra/nvmap/nvmap_init.c index 60d65d16..304ae9f1 100644 --- a/drivers/video/tegra/nvmap/nvmap_init.c +++ b/drivers/video/tegra/nvmap/nvmap_init.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * SPDX-FileCopyrightText: Copyright (c) 2014-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2014-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ #define pr_fmt(fmt) "%s: " fmt, __func__ @@ -31,13 +31,13 @@ #include #endif -struct device __weak tegra_generic_dev; +static struct device tegra_generic_dev; -struct device tegra_vpr_dev; -struct device tegra_vpr1_dev; +static struct device tegra_vpr_dev; +static struct device tegra_vpr1_dev; -struct device __weak tegra_generic_cma_dev; -struct device __weak tegra_vpr_cma_dev; +static struct device tegra_generic_cma_dev; +static struct device tegra_vpr_cma_dev; static struct platform_device *pdev; extern ulong nvmap_init_time; diff --git a/include/linux/platform/tegra/common.h b/include/linux/platform/tegra/common.h index f7fbabea..8b05b667 100644 --- a/include/linux/platform/tegra/common.h +++ b/include/linux/platform/tegra/common.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ #ifndef __MACH_TEGRA_COMMON_H @@ -23,10 +23,8 @@ extern phys_addr_t tegra_avp_kernel_start; extern phys_addr_t tegra_avp_kernel_size; void ahb_gizmo_writel(unsigned long val, void __iomem *reg); -extern struct device tegra_generic_cma_dev; extern int tegra_with_secure_firmware; -extern struct device tegra_generic_dev; u32 tegra_get_bct_strapping(void); u32 tegra_get_fuse_opt_subrevision(void);