[PATCH v2 01/49] drm/atomic: Constify mode argument to mode_valid_path()

Sebastian Reichel sre at kernel.org
Sat Feb 9 02:01:54 UTC 2019


Hi,

On Fri, Jan 11, 2019 at 05:50:32AM +0200, 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 at ideasonboard.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.com>

-- Sebastian

>  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 54e2ae614dcc..d4ebec2c9f15 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -489,7 +489,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;
>  
> @@ -528,7 +528,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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190209/1f781212/attachment-0001.sig>


More information about the dri-devel mailing list