drm/ast: remove duplicate assignment of ast_crtc_funcs member
Subsystems (3)
PATCH 1/1 drm/ast: remove duplicate assignment of ast_crtc_funcs member
The struct member 'set_config' was assigned twice:
static const struct drm_crtc_funcs ast_crtc_funcs = {
.reset = ast_crtc_reset,
.set_config = drm_crtc_helper_set_config,
......
.set_config = drm_atomic_helper_set_config,
......
};
Since the second one is which we use now in fact, we can remove the first one.
This fixes the following coccicheck warning:
drivers/gpu/drm/ast/ast_mode.c:932:50-51: set_config: first occurrence line 934, second occurrence line 937
--- drivers/gpu/drm/ast/ast_mode.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/ast/ast_mode.c +0 -1
@@ -931,7 +931,6 @@ static void ast_crtc_atomic_destroy_state(struct drm_crtc *crtc,static const struct drm_crtc_funcs ast_crtc_funcs = { .reset = ast_crtc_reset, - .set_config = drm_crtc_helper_set_config, .gamma_set = drm_atomic_helper_legacy_gamma_set, .destroy = ast_crtc_destroy, .set_config = drm_atomic_helper_set_config,
Signature · 1 line
2.21.1
Hi
Am 29.04.20 um 16:10 schrieb Jason Yan:
Quoted 13 lines
The struct member '
set_config' was assigned twice:static const struct
drm_crtc_funcsast_crtc_funcs= {
.reset =ast_crtc_reset,
.set_config =drm_crtc_helper_set_config,
......
.set_config =drm_atomic_helper_set_config,
......
};Since the second one is which we use now in fact, we can remove the first one.
Quoted 6 lines
This fixes the following coccicheck warning:
drivers/gpu/drm/ast/ast_mode.c:932:50-51:
set_config: first occurrence line 934, second occurrence line 937Signed-off-by Jason Yan <[email protected]>
Thanks! I'll apply the patch to drm-misc-next soonish.
Best regards
Thomas
Quoted 17 lines
--- drivers/gpu/drm/ast/ast_mode.c | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/ast/ast_mode.c +0
-1@@ -931,7 +931,6 @@ static void ast_crtc_atomic_destroy_state(struct drm_crtc *crtc,static const struct drm_crtc_funcs ast_crtc_funcs = { .reset = ast_crtc_reset, - .set_config = drm_crtc_helper_set_config, .gamma_set = drm_atomic_helper_legacy_gamma_set, .destroy = ast_crtc_destroy, .set_config = drm_atomic_helper_set_config,
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel