[PATCH] drm/tilcdc: plane: Make structure tilcdc_plane_funcs constant

Jyri Sarha jsarha at ti.com
Tue Aug 13 09:46:11 UTC 2019


On 13/08/2019 12:05, Nishka Dasgupta wrote:
> The static structure tilcdc_plane_funcs, of type drm_plane_funcs, is
> used only when passed the fourth argument to drm_plane_init(); however,
> this fourth parameter is declared as const in the function definition.
> Hence make tilcdc_plane_funcs constant as well.
> Issue found with Coccinelle.
> 
> Signed-off-by: Nishka Dasgupta <nishkadg.linux at gmail.com>

Thanks, I'll pick this up.

BR,
Jyri

> ---
>  drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_plane.c b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
> index 8c2776acdf99..bfd5dccca709 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_plane.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
> @@ -13,7 +13,7 @@
>  
>  #include "tilcdc_drv.h"
>  
> -static struct drm_plane_funcs tilcdc_plane_funcs = {
> +static const struct drm_plane_funcs tilcdc_plane_funcs = {
>  	.update_plane	= drm_atomic_helper_update_plane,
>  	.disable_plane	= drm_atomic_helper_disable_plane,
>  	.destroy	= drm_plane_cleanup,
> 


-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


More information about the dri-devel mailing list