* [PATCH][next] drm/msm8998: make const arrays ratio_list and band_list static
@ 2024-09-12 15:10 Colin Ian King
2024-09-12 15:15 ` Dmitry Baryshkov
2024-10-21 12:17 ` Dmitry Baryshkov
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2024-09-12 15:10 UTC (permalink / raw)
To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, linux-arm-msm,
dri-devel, freedreno
Cc: kernel-janitors, linux-kernel
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 <colin.i.king@gmail.com>
---
drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
index 0e3a2b16a2ce..3f8f73e31ddb 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
@@ -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;
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] drm/msm8998: make const arrays ratio_list and band_list static
2024-09-12 15:10 [PATCH][next] drm/msm8998: make const arrays ratio_list and band_list static Colin Ian King
@ 2024-09-12 15:15 ` Dmitry Baryshkov
2024-10-21 12:17 ` Dmitry Baryshkov
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2024-09-12 15:15 UTC (permalink / raw)
To: Colin Ian King
Cc: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, linux-arm-msm, dri-devel, freedreno,
kernel-janitors, linux-kernel
On Thu, Sep 12, 2024 at 04:10:37PM GMT, Colin Ian King wrote:
> 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 <colin.i.king@gmail.com>
> ---
> drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] drm/msm8998: make const arrays ratio_list and band_list static
2024-09-12 15:10 [PATCH][next] drm/msm8998: make const arrays ratio_list and band_list static Colin Ian King
2024-09-12 15:15 ` Dmitry Baryshkov
@ 2024-10-21 12:17 ` Dmitry Baryshkov
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2024-10-21 12:17 UTC (permalink / raw)
To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, linux-arm-msm, dri-devel, freedreno,
Colin Ian King
Cc: kernel-janitors, linux-kernel
On Thu, 12 Sep 2024 16:10:37 +0100, Colin Ian King wrote:
> Don't populate the const read-only arrays ratio_list and band_list on 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,
--
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-21 12:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-12 15:10 [PATCH][next] drm/msm8998: make const arrays ratio_list and band_list static Colin Ian King
2024-09-12 15:15 ` Dmitry Baryshkov
2024-10-21 12:17 ` Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®