* [PATCH][next] drm/bridge: tc358767: make read-only array ext_div static const
@ 2026-11-12 16:21 Colin Ian King
2026-11-12 17:39 ` Luca Ceresoli
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2026-11-12 16:21 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
dri-devel
Cc: kernel-janitors, linux-kernel
Don't populate the read-only array ext_div on the stack
at run time, instead make it static const
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/gpu/drm/bridge/tc358767.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index f61c619fb305..3735e8db9e82 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -593,12 +593,12 @@ static int tc_pllupdate(struct tc_data *tc, unsigned int pllctrl)
static int tc_pxl_pll_calc(struct tc_data *tc, u32 refclk, u32 pixelclock,
int *out_best_pixelclock, u32 *out_pxl_pllparam)
{
+ static const int ext_div[] = { 1, 2, 3, 5, 7 };
int i_pre, best_pre = 1;
int i_post, best_post = 1;
int div, best_div = 1;
int mul, best_mul = 1;
int delta, best_delta;
- int ext_div[] = {1, 2, 3, 5, 7};
int clk_min, clk_max;
int best_pixelclock = 0;
int vco_hi = 0;
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][next] drm/bridge: tc358767: make read-only array ext_div static const
2026-11-12 16:21 [PATCH][next] drm/bridge: tc358767: make read-only array ext_div static const Colin Ian King
@ 2026-11-12 17:39 ` Luca Ceresoli
0 siblings, 0 replies; 2+ messages in thread
From: Luca Ceresoli @ 2026-11-12 17:39 UTC (permalink / raw)
To: Colin Ian King, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Luca Ceresoli,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On Thu Nov 12, 2026 at 5:21 PM CET, Colin Ian King wrote:
> Don't populate the read-only array ext_div on the stack
> at run time, instead make it static const
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-12 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 16:21 [PATCH][next] drm/bridge: tc358767: make read-only array ext_div static const Colin Ian King
2026-11-12 17:39 ` Luca Ceresoli
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®