drm/tilcdc: plane: Make structure tilcdc_plane_funcs constant
Subsystems (3)
PATCH 1/1 drm/tilcdc: plane: Make structure tilcdc_plane_funcs constant
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 <[email protected]>
--- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/tilcdc_plane.c +1 -1
@@ -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,
Signature · 6 lines
2.19.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Nishka Dasgupta
The static structure
tilcdc_plane_funcs, of typedrm_plane_funcs, is used only when passed the fourth argument todrm_plane_init(); however, this fourth parameter is declared as const in the function definition. Hence maketilcdc_plane_funcsconstant as well.
Issue found with Coccinelle.Signed-off-by Nishka Dasgupta <[email protected]>
Thanks, I'll pick this up.
BR,
Jyri
Quoted 18 lines
--- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/tilcdc/tilcdc_plane.c +1
-1@@ -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,
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel