drm: Constify drm_mode_config atomic helper private pointer
Subsystems (7)
PATCH 1/1 drm: Constify drm_mode_config atomic helper private pointer
The drm_mode_config helper private field points to a structure of function pointers that don't need to be modified at runtime. Make it const.
--- drivers/gpu/drm/arm/malidp_drv.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/imx/imx-drm-core.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- include/drm/drm_mode_config.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/arm/malidp_drv.c +1 -1
@@ -101,7 +101,7 @@ static void malidp_atomic_commit_tail(struct drm_atomic_state *state)drm_atomic_helper_cleanup_planes (drm, state); } -static struct drm_mode_config_helper_funcs malidp_mode_config_helpers = { +static const struct drm_mode_config_helper_funcs malidp_mode_config_helpers = { .atomic_commit_tail = malidp_atomic_commit_tail, };
drivers/gpu/drm/drm_atomic_helper.c +1 -1
@@ -1197,7 +1197,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_tail);static void commit_tail (struct drm_atomic_state *old_state) {struct drm_device *dev = old_state->dev; -struct drm_mode_config_helper_funcs *funcs; +const struct drm_mode_config_helper_funcs *funcs; funcs = dev->mode_config.helper_private;
drivers/gpu/drm/imx/imx-drm-core.c +1 -1
@@ -176,7 +176,7 @@ static void imx_drm_atomic_commit_tail(struct drm_atomic_state *state)drm_atomic_helper_cleanup_planes (dev, state); } -static struct drm_mode_config_helper_funcs imx_drm_mode_config_helpers = { +static const struct drm_mode_config_helper_funcs imx_drm_mode_config_helpers = { .atomic_commit_tail = imx_drm_atomic_commit_tail, };
drivers/gpu/drm/rockchip/rockchip_drm_fb.c +1 -1
@@ -193,7 +193,7 @@ rockchip_atomic_commit_tail(struct drm_atomic_state *state)drm_atomic_helper_cleanup_planes (dev, state); } -static struct drm_mode_config_helper_funcs rockchip_mode_config_helpers = { +static const struct drm_mode_config_helper_funcs rockchip_mode_config_helpers = { .atomic_commit_tail = rockchip_atomic_commit_tail, };
drivers/gpu/drm/virtio/virtgpu_display.c +1 -1
@@ -346,7 +346,7 @@ static void vgdev_atomic_commit_tail(struct drm_atomic_state *state)drm_atomic_helper_cleanup_planes (dev, state); } -static struct drm_mode_config_helper_funcs virtio_mode_config_helpers = { +static const struct drm_mode_config_helper_funcs virtio_mode_config_helpers = { .atomic_commit_tail = vgdev_atomic_commit_tail, };
include/drm/drm_mode_config.h +1 -1
@@ -653,7 +653,7 @@ struct drm_mode_config {/* cursor size */ uint32_t cursor_width, cursor_height; -struct drm_mode_config_helper_funcs *helper_private; +const struct drm_mode_config_helper_funcs *helper_private; };void drm_mode_config_init (struct drm_device *dev);
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 3 lines · Laurent Pinchart
The
drm_mode_confighelper private field points to a structure of function pointers that don't need to be modified at runtime. Make it const.
Signature · 5 lines
Gabriel Krisman Bertazi _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedQuoted 7 lines · Gabriel Krisman Bertazi
Quoted 3 lines · Laurent Pinchart
The
drm_mode_confighelper private field points to a structure of function pointers that don't need to be modified at runtime. Make it const.Reviewed-by Gabriel Krisman Bertazi <[email protected]>
Applied to drm-misc, thanks for patch&review.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Laurent Pinchart
The
drm_mode_confighelper private field points to a structure of function pointers that don't need to be modified at runtime. Make it const.Signed-off-by Laurent Pinchart <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel