From: Jani Nikula <jani.nikula@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>,
Daniel Vetter <daniel.vetter@intel.com>,
David Airlie <airlied@linux.ie>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Sean Paul <seanpaul@chromium.org>Maxime Ripard
<mripard@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/modes: Make the whitelist more const
Date: Fri, 06 Sep 2019 10:56:10 +0300 [thread overview]
Message-ID: <87zhjh3lk5.fsf@intel.com> (raw)
In-Reply-To: <20190906074614.30608-1-mripard@kernel.org>
On Fri, 06 Sep 2019, Maxime Ripard <mripard@kernel.org> 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 <jani.nikula@intel.com>
> Fixes: 3764137906a5 ("drm/modes: Introduce a whitelist for the named modes")
> Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
> 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
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-09-06 7:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 7:46 [PATCH] drm/modes: Make the whitelist more const Maxime Ripard
2019-09-06 7:56 ` Jani Nikula [this message]
2019-09-06 16:13 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhjh3lk5.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=seanpaul@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox