drm/msm8998: make const arrays ratio_list and band_list static
Subsystems (4)
PATCH 1/1 drm/msm8998: make const arrays ratio_list and band_list static
Don't populate the const read-only arrays ratio_list and band_list on the stack at run time, instead make them static.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c +2 -3
@@ -166,9 +166,8 @@ static inline u64 pll_cmp_to_fdata(u32 pll_cmp, unsigned long ref_clk)#define HDMI_MHZ_TO_HZ ((u64)1000000)static int pll_get_post_div (struct hdmi_8998_post_divider *pd,u64 bclk) { -u32 const ratio_list[] = {1 ,2 ,3 ,4 ,5 ,6 , -9 ,10 ,12 ,15 ,25 }; -u32 const band_list[] = {0 ,1 ,2 ,3 }; +static const u32 ratio_list[] = {1 ,2 ,3 ,4 ,5 ,6 ,9 ,10 ,12 ,15 ,25 }; +static const u32 band_list[] = {0 ,1 ,2 ,3 };u32 const sz_ratio =ARRAY_SIZE (ratio_list);u32 const sz_band =ARRAY_SIZE (band_list);u32 const cmp_cnt =1024 ;
Signature · 1 line
2.39.2
Quoted 8 lines · Colin Ian King
Don't populate the const read-only arrays
ratio_listandband_liston the stack at run time, instead make them static.Signed-off-by Colin Ian King <[email protected]>--- drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by Dmitry Baryshkov <[email protected]>
Signature · 2 lines
With best wishes Dmitry
Dmitry Baryshkov
AppliedQuoted 4 lines · Colin Ian King
Don't populate the const read-only arrays
ratio_listandband_liston the stack at run time, instead make them static.
Applied, thanks!
[1/1] drm/msm8998: make const arrays ratio_list and band_list static
https://gitlab.freedesktop.org/lumag/msm/-/commit/71f40d32fa4b
Best regards,
Signature · 1 line
Dmitry Baryshkov <[email protected]>