Re: [PATCH][next] drm/i915/display: make read-only array rates static const
From: Jani Nikula
Date: Thu Jun 18 2026 - 07:12:20 EST
On Mon, 08 Jun 2026, Colin Ian King <colin.i.king@xxxxxxxxx> wrote:
> Don't populate the read-only array rates the stack at run time,
> instead make it static const.
>
> Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>
Thanks for the patch, pushed to drm-intel-next.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 9076c2b176ec..351a62654a8d 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -71,7 +71,7 @@
>
> bool intel_hdmi_is_frl(u32 clock)
> {
> - u32 rates[] = { 300000, 600000, 800000, 1000000, 1200000 };
> + static const u32 rates[] = { 300000, 600000, 800000, 1000000, 1200000 };
> int i;
>
> for (i = 0; i < ARRAY_SIZE(rates); i++)
--
Jani Nikula, Intel