* [PATCH] drm/amd: remove possible condition with no effect (if == else)
@ 2022-08-23 6:41 Bernard Zhao
2022-08-25 16:01 ` Alex Deucher
0 siblings, 1 reply; 4+ messages in thread
From: Bernard Zhao @ 2022-08-23 6:41 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
Nicholas Kazlauskas, Michael Strauss, Eric Yang, Fangzhi Zuo,
Nikola Cornij, amd-gfx, dri-devel, linux-kernel
Cc: Bernard Zhao, zhaojunkui2008
This patch fix cocci warning:
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c:1816:6-8:
WARNING: possible condition with no effect (if == else).
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
index 85f32206a766..dccc9794e6a2 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
@@ -1813,8 +1813,6 @@ static bool dcn314_resource_construct(
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
dc->debug = debug_defaults_drv;
- else if (dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS)
- dc->debug = debug_defaults_diags;
else
dc->debug = debug_defaults_diags;
// Init the vm_helper
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amd: remove possible condition with no effect (if == else)
2022-08-23 6:41 [PATCH] drm/amd: remove possible condition with no effect (if == else) Bernard Zhao
@ 2022-08-25 16:01 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2022-08-25 16:01 UTC (permalink / raw)
To: Bernard Zhao
Cc: zhaojunkui2008, Eric Yang, Leo Li, Pan, Xinhui, Rodrigo Siqueira,
linux-kernel, amd-gfx, Nicholas Kazlauskas, David Airlie,
Fangzhi Zuo, Michael Strauss, dri-devel, Alex Deucher,
Nikola Cornij, Christian König
Applied. Thanks!
On Tue, Aug 23, 2022 at 3:30 AM Bernard Zhao <bernard@vivo.com> wrote:
>
> This patch fix cocci warning:
> drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c:1816:6-8:
> WARNING: possible condition with no effect (if == else).
>
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
> index 85f32206a766..dccc9794e6a2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
> @@ -1813,8 +1813,6 @@ static bool dcn314_resource_construct(
>
> if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
> dc->debug = debug_defaults_drv;
> - else if (dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS)
> - dc->debug = debug_defaults_diags;
> else
> dc->debug = debug_defaults_diags;
> // Init the vm_helper
> --
> 2.33.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amd: remove possible condition with no effect (if == else)
2022-08-23 7:00 Bernard Zhao
@ 2022-08-25 16:01 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2022-08-25 16:01 UTC (permalink / raw)
To: Bernard Zhao
Cc: Joshua Aberback, amd-gfx, zhaojunkui2008, Leo Li, Wenjing Liu,
dri-devel, Pan, Xinhui, Rodrigo Siqueira, linux-kernel,
Samson Tam, Nicholas Kazlauskas, Meenakshikumar Somasundaram,
David Airlie, Alex Hung, Alvin Lee, Martin Leung, Alex Deucher,
Jun Lei, Christian König
Applied. Thanks!
Alex
On Tue, Aug 23, 2022 at 3:01 AM Bernard Zhao <bernard@vivo.com> wrote:
>
> This patch fix cocci warning:
> drivers/gpu/drm/amd/display/dc/core/dc.c:3335:2-4: WARNING:
> possible condition with no effect (if == else).
>
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index aeecca68dea7..2d4c44083d79 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -3332,13 +3332,8 @@ static void commit_planes_for_stream(struct dc *dc,
> /* Since phantom pipe programming is moved to post_unlock_program_front_end,
> * move the SubVP lock to after the phantom pipes have been setup
> */
> - if (should_lock_all_pipes && dc->hwss.interdependent_update_lock) {
> - if (dc->hwss.subvp_pipe_control_lock)
> - dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
> - } else {
> - if (dc->hwss.subvp_pipe_control_lock)
> - dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
> - }
> + if (dc->hwss.subvp_pipe_control_lock)
> + dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
> return;
> }
>
> --
> 2.33.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drm/amd: remove possible condition with no effect (if == else)
@ 2022-08-23 7:00 Bernard Zhao
2022-08-25 16:01 ` Alex Deucher
0 siblings, 1 reply; 4+ messages in thread
From: Bernard Zhao @ 2022-08-23 7:00 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
Nicholas Kazlauskas, Jun Lei, Meenakshikumar Somasundaram,
Martin Leung, Alvin Lee, Samson Tam, Alex Hung, Joshua Aberback,
Wenjing Liu, amd-gfx, dri-devel, linux-kernel
Cc: Bernard Zhao, zhaojunkui2008
This patch fix cocci warning:
drivers/gpu/drm/amd/display/dc/core/dc.c:3335:2-4: WARNING:
possible condition with no effect (if == else).
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index aeecca68dea7..2d4c44083d79 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3332,13 +3332,8 @@ static void commit_planes_for_stream(struct dc *dc,
/* Since phantom pipe programming is moved to post_unlock_program_front_end,
* move the SubVP lock to after the phantom pipes have been setup
*/
- if (should_lock_all_pipes && dc->hwss.interdependent_update_lock) {
- if (dc->hwss.subvp_pipe_control_lock)
- dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
- } else {
- if (dc->hwss.subvp_pipe_control_lock)
- dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
- }
+ if (dc->hwss.subvp_pipe_control_lock)
+ dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
return;
}
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-25 16:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23 6:41 [PATCH] drm/amd: remove possible condition with no effect (if == else) Bernard Zhao
2022-08-25 16:01 ` Alex Deucher
2022-08-23 7:00 Bernard Zhao
2022-08-25 16:01 ` Alex Deucher
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).