From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/atomic: Constify mode argument to mode_valid_path()
Date: Tue, 5 Jun 2018 16:28:42 +0300 [thread overview]
Message-ID: <20180605132842.GH23723@intel.com> (raw)
In-Reply-To: <20180605125128.31781-1-laurent.pinchart@ideasonboard.com>
On Tue, Jun 05, 2018 at 03:51:28PM +0300, Laurent Pinchart wrote:
> The mode_valid_path() function validates the mode it receives without
> ever modifying it. Constify the mode pointer argument to make that
> explicit.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 130da5195f3b..7c3958f73dd4 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -456,7 +456,7 @@ mode_fixup(struct drm_atomic_state *state)
> static enum drm_mode_status mode_valid_path(struct drm_connector *connector,
> struct drm_encoder *encoder,
> struct drm_crtc *crtc,
> - struct drm_display_mode *mode)
> + const struct drm_display_mode *mode)
> {
> enum drm_mode_status ret;
>
> @@ -495,7 +495,7 @@ mode_valid(struct drm_atomic_state *state)
> struct drm_crtc *crtc = conn_state->crtc;
> struct drm_crtc_state *crtc_state;
> enum drm_mode_status mode_status;
> - struct drm_display_mode *mode;
> + const struct drm_display_mode *mode;
>
> if (!crtc || !encoder)
> continue;
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2018-06-05 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 12:51 [PATCH] drm/atomic: Constify mode argument to mode_valid_path() Laurent Pinchart
2018-06-05 13:28 ` Ville Syrjälä [this message]
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=20180605132842.GH23723@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.