* [PATCH] drm/ast: remove duplicate assignment of ast_crtc_funcs member
@ 2020-04-29 14:10 Jason Yan
2020-04-29 14:57 ` Thomas Zimmermann
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-29 14:10 UTC (permalink / raw)
To: airlied, airlied, daniel, tzimmermann, kraxel, dri-devel, linux-kernel
Cc: Jason Yan
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
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/gpu/drm/ast/ast_mode.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index d2ab81f9c498..7062bcd78740 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -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,
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/ast: remove duplicate assignment of ast_crtc_funcs member
2020-04-29 14:10 [PATCH] drm/ast: remove duplicate assignment of ast_crtc_funcs member Jason Yan
@ 2020-04-29 14:57 ` Thomas Zimmermann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2020-04-29 14:57 UTC (permalink / raw)
To: Jason Yan, airlied, airlied, daniel, kraxel, dri-devel, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1624 bytes --]
Hi
Am 29.04.20 um 16:10 schrieb Jason Yan:
> 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
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks! I'll apply the patch to drm-misc-next soonish.
Best regards
Thomas
> ---
> drivers/gpu/drm/ast/ast_mode.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index d2ab81f9c498..7062bcd78740 100644
> --- a/drivers/gpu/drm/ast/ast_mode.c
> +++ b/drivers/gpu/drm/ast/ast_mode.c
> @@ -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,
>
--
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-29 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 14:10 [PATCH] drm/ast: remove duplicate assignment of ast_crtc_funcs member Jason Yan
2020-04-29 14:57 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).