On Fri, 06 Sep 2019, Maxime Ripard <[email protected]> wrote:
> The commit 3764137906a5 ("drm/modes: Introduce a whitelist for the named
> modes") introduced a whitelist in the named modes lookup code in order to
> be a bit more robust.
>
> However, even though the char pointers were made const, the data they were
> pointing were not. Let's fix that.

Or rather, the char pointers were const, and they pointed at const
string literals, but the array of pointers itself was not const.

Reviewed-by: Jani Nikula <[email protected]>

> Fixes: 3764137906a5 ("drm/modes: Introduce a whitelist for the named modes")
> Suggested-by: Jani Nikula <[email protected]>
> Signed-off-by: Maxime Ripard <[email protected]>
> ---
>  drivers/gpu/drm/drm_modes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 858c67281518..88232698d7a0 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -1677,7 +1677,7 @@ static int drm_mode_parse_cmdline_options(char *str, 
> size_t len,
>       return 0;
>  }
>  
> -static const char *drm_named_modes_whitelist[] = {
> +static const char * const drm_named_modes_whitelist[] = {
>       "NTSC",
>       "PAL",
>  };

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to