Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: tegra: Fix sparse warnings for functions not declared as static

Sparse reports the following warnings for functions in clk-tegra210.c
that should be declared as static:

drivers/clk/tegra/clk-tegra210.c:460:6: warning: symbol
'tegra210_pllcx_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:485:6: warning: symbol
'_pllc_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:490:6: warning: symbol
'_pllc2_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:495:6: warning: symbol
'_pllc3_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:500:6: warning: symbol
'_plla1_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:510:6: warning: symbol
'tegra210_plla_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:562:6: warning: symbol
'tegra210_plld_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:701:6: warning: symbol
'tegra210_plld2_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:709:6: warning: symbol
'tegra210_plldp_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:722:6: warning: symbol
'tegra210_pllc4_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:731:6: warning: symbol
'tegra210_pllre_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:844:6: warning: symbol
'tegra210_pllx_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:904:6: warning: symbol
'tegra210_pllmb_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:963:6: warning: symbol
'tegra210_pllp_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:1025:6: warning: symbol
'tegra210_pllu_set_defaults' was not declared. Should it be static?
drivers/clk/tegra/clk-tegra210.c:1215:15: warning: symbol
'tegra210_clk_adjust_vco_min' was not declared. Should it be static?

Fix this by declaring the above as static.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Jon Hunter and committed by
Thierry Reding
fd360e20 d9e65791

+19 -17
+19 -17
drivers/clk/tegra/clk-tegra210.c
··· 458 458 PLLCX_MISC3_WRITE_MASK); 459 459 } 460 460 461 - void tegra210_pllcx_set_defaults(const char *name, struct tegra_clk_pll *pllcx) 461 + static void tegra210_pllcx_set_defaults(const char *name, 462 + struct tegra_clk_pll *pllcx) 462 463 { 463 464 pllcx->params->defaults_set = true; 464 465 ··· 484 483 udelay(1); 485 484 } 486 485 487 - void _pllc_set_defaults(struct tegra_clk_pll *pllcx) 486 + static void _pllc_set_defaults(struct tegra_clk_pll *pllcx) 488 487 { 489 488 tegra210_pllcx_set_defaults("PLL_C", pllcx); 490 489 } 491 490 492 - void _pllc2_set_defaults(struct tegra_clk_pll *pllcx) 491 + static void _pllc2_set_defaults(struct tegra_clk_pll *pllcx) 493 492 { 494 493 tegra210_pllcx_set_defaults("PLL_C2", pllcx); 495 494 } 496 495 497 - void _pllc3_set_defaults(struct tegra_clk_pll *pllcx) 496 + static void _pllc3_set_defaults(struct tegra_clk_pll *pllcx) 498 497 { 499 498 tegra210_pllcx_set_defaults("PLL_C3", pllcx); 500 499 } 501 500 502 - void _plla1_set_defaults(struct tegra_clk_pll *pllcx) 501 + static void _plla1_set_defaults(struct tegra_clk_pll *pllcx) 503 502 { 504 503 tegra210_pllcx_set_defaults("PLL_A1", pllcx); 505 504 } ··· 509 508 * PLL with dynamic ramp and fractional SDM. Dynamic ramp is not used. 510 509 * Fractional SDM is allowed to provide exact audio rates. 511 510 */ 512 - void tegra210_plla_set_defaults(struct tegra_clk_pll *plla) 511 + static void tegra210_plla_set_defaults(struct tegra_clk_pll *plla) 513 512 { 514 513 u32 mask; 515 514 u32 val = readl_relaxed(clk_base + plla->params->base_reg); ··· 561 560 * PLLD 562 561 * PLL with fractional SDM. 563 562 */ 564 - void tegra210_plld_set_defaults(struct tegra_clk_pll *plld) 563 + static void tegra210_plld_set_defaults(struct tegra_clk_pll *plld) 565 564 { 566 565 u32 val; 567 566 u32 mask = 0xffff; ··· 700 699 udelay(1); 701 700 } 702 701 703 - void tegra210_plld2_set_defaults(struct tegra_clk_pll *plld2) 702 + static void tegra210_plld2_set_defaults(struct tegra_clk_pll *plld2) 704 703 { 705 704 plldss_defaults("PLL_D2", plld2, PLLD2_MISC0_DEFAULT_VALUE, 706 705 PLLD2_MISC1_CFG_DEFAULT_VALUE, ··· 708 707 PLLD2_MISC3_CTRL2_DEFAULT_VALUE); 709 708 } 710 709 711 - void tegra210_plldp_set_defaults(struct tegra_clk_pll *plldp) 710 + static void tegra210_plldp_set_defaults(struct tegra_clk_pll *plldp) 712 711 { 713 712 plldss_defaults("PLL_DP", plldp, PLLDP_MISC0_DEFAULT_VALUE, 714 713 PLLDP_MISC1_CFG_DEFAULT_VALUE, ··· 721 720 * Base and misc0 layout is the same as PLLD2/PLLDP, but no SDM/SSC support. 722 721 * VCO is exposed to the clock tree via fixed 1/3 and 1/5 dividers. 723 722 */ 724 - void tegra210_pllc4_set_defaults(struct tegra_clk_pll *pllc4) 723 + static void tegra210_pllc4_set_defaults(struct tegra_clk_pll *pllc4) 725 724 { 726 725 plldss_defaults("PLL_C4", pllc4, PLLC4_MISC0_DEFAULT_VALUE, 0, 0, 0); 727 726 } ··· 730 729 * PLLRE 731 730 * VCO is exposed to the clock tree directly along with post-divider output 732 731 */ 733 - void tegra210_pllre_set_defaults(struct tegra_clk_pll *pllre) 732 + static void tegra210_pllre_set_defaults(struct tegra_clk_pll *pllre) 734 733 { 735 734 u32 mask; 736 735 u32 val = readl_relaxed(clk_base + pllre->params->base_reg); ··· 843 842 PLLX_MISC5_WRITE_MASK); 844 843 } 845 844 846 - void tegra210_pllx_set_defaults(struct tegra_clk_pll *pllx) 845 + static void tegra210_pllx_set_defaults(struct tegra_clk_pll *pllx) 847 846 { 848 847 u32 val; 849 848 u32 step_a, step_b; ··· 903 902 } 904 903 905 904 /* PLLMB */ 906 - void tegra210_pllmb_set_defaults(struct tegra_clk_pll *pllmb) 905 + static void tegra210_pllmb_set_defaults(struct tegra_clk_pll *pllmb) 907 906 { 908 907 u32 mask, val = readl_relaxed(clk_base + pllmb->params->base_reg); 909 908 ··· 962 961 ~mask & PLLP_MISC1_WRITE_MASK); 963 962 } 964 963 965 - void tegra210_pllp_set_defaults(struct tegra_clk_pll *pllp) 964 + static void tegra210_pllp_set_defaults(struct tegra_clk_pll *pllp) 966 965 { 967 966 u32 mask; 968 967 u32 val = readl_relaxed(clk_base + pllp->params->base_reg); ··· 1024 1023 ~mask & PLLU_MISC1_WRITE_MASK); 1025 1024 } 1026 1025 1027 - void tegra210_pllu_set_defaults(struct tegra_clk_pll *pllu) 1026 + static void tegra210_pllu_set_defaults(struct tegra_clk_pll *pllu) 1028 1027 { 1029 1028 u32 val = readl_relaxed(clk_base + pllu->params->base_reg); 1030 1029 ··· 1214 1213 cfg->m *= PLL_SDM_COEFF; 1215 1214 } 1216 1215 1217 - unsigned long tegra210_clk_adjust_vco_min(struct tegra_clk_pll_params *params, 1218 - unsigned long parent_rate) 1216 + static unsigned long 1217 + tegra210_clk_adjust_vco_min(struct tegra_clk_pll_params *params, 1218 + unsigned long parent_rate) 1219 1219 { 1220 1220 unsigned long vco_min = params->vco_min; 1221 1221