drm/bridge: tc358767: make read-only array ext_div static const
Subsystems (4)
PATCH 1/1 drm/bridge: tc358767: make read-only array ext_div static const
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 <[email protected]>
--- drivers/gpu/drm/bridge/tc358767.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/tc358767.c +1 -1
@@ -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 ;
Signature · 1 line
2.55.0
Quoted 4 lines · Colin Ian King
Don't populate the read-only array
ext_divon the stack at run time, instead make it static constSigned-off-by Colin Ian King <[email protected]>
Reviewed-by Luca Ceresoli <[email protected]>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Quoted 2 lines · Colin Ian King
Don't populate the read-only array
ext_divon the stack at run time, instead make it static const
Applied, thanks!
[1/1] drm/bridge: tc358767: make read-only array ext_div static const
commit: 632586bd82b0158a97c6eb6830375c1efda6e0f6
Best regards,
Signature · 3 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com