* [PATCH] drm/amd/display: Simplify bool conversion
@ 2021-01-28 8:49 Abaci Team
2021-01-29 19:26 ` Alex Deucher
0 siblings, 1 reply; 5+ messages in thread
From: Abaci Team @ 2021-01-28 8:49 UTC (permalink / raw)
To: airlied
Cc: daniel, harry.wentland, sunpeng.li, alexander.deucher,
christian.koenig, amd-gfx, dri-devel, linux-kernel, Abaci Team
Fix the following coccicheck warning:
./drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:3137:35-40:
WARNING: conversion to bool not needed here
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Suggested-by: Yang Li <oswb@linux.alibaba.com>
Signed-off-by: Abaci Team <abaci-bugfix@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index 017b67b8..fc03d91 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -3134,7 +3134,7 @@ void dcn10_setup_stereo(struct pipe_ctx *pipe_ctx, struct dc *dc)
pipe_ctx->stream_res.opp->funcs->opp_program_stereo(
pipe_ctx->stream_res.opp,
- flags.PROGRAM_STEREO == 1 ? true:false,
+ flags.PROGRAM_STEREO == 1,
&stream->timing);
pipe_ctx->stream_res.tg->funcs->program_stereo(
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amd/display: Simplify bool conversion
2021-01-28 8:49 [PATCH] drm/amd/display: Simplify bool conversion Abaci Team
@ 2021-01-29 19:26 ` Alex Deucher
0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2021-01-29 19:26 UTC (permalink / raw)
To: Abaci Team
Cc: Dave Airlie, Leo (Sunpeng) Li, LKML, amd-gfx list,
Maling list - DRI developers, Deucher, Alexander,
Christian Koenig
On Thu, Jan 28, 2021 at 2:45 PM Abaci Team
<abaci-bugfix@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warning:
> ./drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:3137:35-40:
> WARNING: conversion to bool not needed here
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Suggested-by: Yang Li <oswb@linux.alibaba.com>
> Signed-off-by: Abaci Team <abaci-bugfix@linux.alibaba.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> index 017b67b8..fc03d91 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> @@ -3134,7 +3134,7 @@ void dcn10_setup_stereo(struct pipe_ctx *pipe_ctx, struct dc *dc)
>
> pipe_ctx->stream_res.opp->funcs->opp_program_stereo(
> pipe_ctx->stream_res.opp,
> - flags.PROGRAM_STEREO == 1 ? true:false,
> + flags.PROGRAM_STEREO == 1,
> &stream->timing);
>
> pipe_ctx->stream_res.tg->funcs->program_stereo(
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] drm/amd/display: Simplify bool conversion
@ 2022-11-06 14:41 wangkailong
0 siblings, 0 replies; 5+ messages in thread
From: wangkailong @ 2022-11-06 14:41 UTC (permalink / raw)
To: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
christian.koenig, Xinhui.Pan, airlied, daniel, HaoPing.Liu,
alex.hung
Cc: amd-gfx, dri-devel, linux-kernel
Fix the following coccicheck warning:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c:109:52-57:
WARNING: conversion to bool not needed here
Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
index 3675b39e297a..bdac1ea12471 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
@@ -106,7 +106,7 @@ static void vblank_control_worker(struct work_struct *work)
dm->active_vblank_irq_count--;
dc_allow_idle_optimizations(
- dm->dc, dm->active_vblank_irq_count == 0 ? true : false);
+ dm->dc, dm->active_vblank_irq_count != 0);
DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amd/display: Simplify bool conversion
2021-02-18 7:34 Yang Li
@ 2021-02-18 18:40 ` Alex Deucher
0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2021-02-18 18:40 UTC (permalink / raw)
To: Yang Li
Cc: Dave Airlie, Leo (Sunpeng) Li, LKML, amd-gfx list,
Maling list - DRI developers, Daniel Vetter, Deucher, Alexander,
Wentland, Harry, Christian Koenig
Applied. Thanks!
Alex
On Thu, Feb 18, 2021 at 9:23 AM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warning:
> ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8142:16-21: WARNING:
> conversion to bool not needed here
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 961abf1..f163e54 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -8138,8 +8138,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
> hdcp_update_display(
> adev->dm.hdcp_workqueue, aconnector->dc_link->link_index, aconnector,
> new_con_state->hdcp_content_type,
> - new_con_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED ? true
> - : false);
> + new_con_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED);
> }
> #endif
>
> --
> 1.8.3.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] drm/amd/display: Simplify bool conversion
@ 2021-02-18 7:34 Yang Li
2021-02-18 18:40 ` Alex Deucher
0 siblings, 1 reply; 5+ messages in thread
From: Yang Li @ 2021-02-18 7:34 UTC (permalink / raw)
To: airlied
Cc: daniel, harry.wentland, sunpeng.li, alexander.deucher,
christian.koenig, amd-gfx, dri-devel, linux-kernel, Yang Li
Fix the following coccicheck warning:
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8142:16-21: WARNING:
conversion to bool not needed here
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 961abf1..f163e54 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8138,8 +8138,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
hdcp_update_display(
adev->dm.hdcp_workqueue, aconnector->dc_link->link_index, aconnector,
new_con_state->hdcp_content_type,
- new_con_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED ? true
- : false);
+ new_con_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED);
}
#endif
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-06 14:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 8:49 [PATCH] drm/amd/display: Simplify bool conversion Abaci Team
2021-01-29 19:26 ` Alex Deucher
2021-02-18 7:34 Yang Li
2021-02-18 18:40 ` Alex Deucher
2022-11-06 14:41 wangkailong
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).