From d782c9ee5b57a606178a832fe0428791d5fe289d Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Tue, 10 Jan 2023 10:43:32 -0800 Subject: [PATCH] tegra: hwpm: fix sparse errors Below listed functions are defined and used in the same source file, hence update the functions to be static. - tegra_hwpm_element_disable - tegra_hwpm_element_reserve - tegra_hwpm_element_release Bug 3528414 Change-Id: Ib9aa44001fb5fac1e339b3264a4d750af09b9a01 Signed-off-by: Vedashree Vidwans Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2847009 GVS: Gerrit_Virtual_Submit Reviewed-by: Seema Khowala --- drivers/tegra/hwpm/common/aperture.c | 8 ++++---- drivers/tegra/hwpm/include/tegra_hwpm_common.h | 7 +------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/tegra/hwpm/common/aperture.c b/drivers/tegra/hwpm/common/aperture.c index 56e3f19..e2f5656 100644 --- a/drivers/tegra/hwpm/common/aperture.c +++ b/drivers/tegra/hwpm/common/aperture.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -20,7 +20,7 @@ #include #include -int tegra_hwpm_element_reserve(struct tegra_soc_hwpm *hwpm, +static int tegra_hwpm_element_reserve(struct tegra_soc_hwpm *hwpm, struct hwpm_ip_inst *ip_inst, struct hwpm_ip_aperture *element) { int err = 0; @@ -57,7 +57,7 @@ fail: return err; } -int tegra_hwpm_element_disable(struct tegra_soc_hwpm *hwpm, +static int tegra_hwpm_element_disable(struct tegra_soc_hwpm *hwpm, struct hwpm_ip_aperture *element) { int err = 0; @@ -94,7 +94,7 @@ fail: return err; } -int tegra_hwpm_element_release(struct tegra_soc_hwpm *hwpm, +static int tegra_hwpm_element_release(struct tegra_soc_hwpm *hwpm, struct hwpm_ip_aperture *element) { int err = 0; diff --git a/drivers/tegra/hwpm/include/tegra_hwpm_common.h b/drivers/tegra/hwpm/include/tegra_hwpm_common.h index 5acbc31..7b1d8eb 100644 --- a/drivers/tegra/hwpm/include/tegra_hwpm_common.h +++ b/drivers/tegra/hwpm/include/tegra_hwpm_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -49,11 +49,6 @@ int tegra_hwpm_reserve_resource(struct tegra_soc_hwpm *hwpm, u32 resource); int tegra_hwpm_release_resources(struct tegra_soc_hwpm *hwpm); int tegra_hwpm_bind_resources(struct tegra_soc_hwpm *hwpm); -int tegra_hwpm_element_reserve(struct tegra_soc_hwpm *hwpm, - struct hwpm_ip_inst *ip_inst, struct hwpm_ip_aperture *perfmon); -int tegra_hwpm_element_release(struct tegra_soc_hwpm *hwpm, - struct hwpm_ip_aperture *perfmon); - int tegra_hwpm_set_fs_info_ip_ops(struct tegra_soc_hwpm *hwpm, struct tegra_hwpm_ip_ops *ip_ops, u64 base_address, u32 ip_idx, bool available);