[PATCH 2/2] clk: tegra: periph: Make tegra_clk_periph_ops static

Pei Xiao posted 2 patches 3 months ago
[PATCH 2/2] clk: tegra: periph: Make tegra_clk_periph_ops static
Posted by Pei Xiao 3 months ago
Reduce symbol visibility by converting tegra_clk_periph_ops to static.
Removed the extern declaration from clk.h as the symbol is now locally
scoped to clk-periph.c.

Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
 drivers/clk/tegra/clk-periph.c | 2 +-
 drivers/clk/tegra/clk.h        | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/tegra/clk-periph.c b/drivers/clk/tegra/clk-periph.c
index c9fc52a36fce..fa0cd7bb8ee6 100644
--- a/drivers/clk/tegra/clk-periph.c
+++ b/drivers/clk/tegra/clk-periph.c
@@ -132,7 +132,7 @@ static void clk_periph_restore_context(struct clk_hw *hw)
 	clk_periph_set_parent(hw, parent_id);
 }
 
-const struct clk_ops tegra_clk_periph_ops = {
+static const struct clk_ops tegra_clk_periph_ops = {
 	.get_parent = clk_periph_get_parent,
 	.set_parent = clk_periph_set_parent,
 	.recalc_rate = clk_periph_recalc_rate,
diff --git a/drivers/clk/tegra/clk.h b/drivers/clk/tegra/clk.h
index 5d80d8b79b8e..9ea839af14bc 100644
--- a/drivers/clk/tegra/clk.h
+++ b/drivers/clk/tegra/clk.h
@@ -629,7 +629,6 @@ struct tegra_clk_periph {
 
 #define TEGRA_CLK_PERIPH_MAGIC 0x18221223
 
-extern const struct clk_ops tegra_clk_periph_ops;
 struct clk *tegra_clk_register_periph(const char *name,
 		const char * const *parent_names, int num_parents,
 		struct tegra_clk_periph *periph, void __iomem *clk_base,
-- 
2.25.1
Re: [PATCH 2/2] clk: tegra: periph: Make tegra_clk_periph_ops static
Posted by Stephen Boyd 2 months, 2 weeks ago
Quoting Pei Xiao (2025-07-09 00:37:14)
> Reduce symbol visibility by converting tegra_clk_periph_ops to static.
> Removed the extern declaration from clk.h as the symbol is now locally
> scoped to clk-periph.c.
> 
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---

Applied to clk-next
Re: [PATCH 2/2] clk: tegra: periph: Make tegra_clk_periph_ops static
Posted by Thierry Reding 3 months ago
On Wed, Jul 09, 2025 at 03:37:14PM +0800, Pei Xiao wrote:
> Reduce symbol visibility by converting tegra_clk_periph_ops to static.
> Removed the extern declaration from clk.h as the symbol is now locally
> scoped to clk-periph.c.
> 
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
>  drivers/clk/tegra/clk-periph.c | 2 +-
>  drivers/clk/tegra/clk.h        | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>