* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-03-05 6:40 Jiapeng Chong
2021-03-05 19:14 ` Alex Deucher
0 siblings, 1 reply; 19+ messages in thread
From: Jiapeng Chong @ 2021-03-05 6:40 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8257:16-21: WARNING:
conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@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 3e1fd1e..10de6c2 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8307,8 +8307,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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] drm/amd/display: Remove unnecessary conversion to bool
2021-03-05 6:40 [PATCH] drm/amd/display: Remove unnecessary conversion to bool Jiapeng Chong
@ 2021-03-05 19:14 ` Alex Deucher
0 siblings, 0 replies; 19+ messages in thread
From: Alex Deucher @ 2021-03-05 19:14 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Leo (Sunpeng) Li, LKML, Maling list - DRI developers,
Dave Airlie, amd-gfx list, Deucher, Alexander, Christian Koenig
The same patch was already applied a while ago.
Thanks,
Alex
On Fri, Mar 5, 2021 at 1:41 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8257:16-21: WARNING:
> conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@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 3e1fd1e..10de6c2 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -8307,8 +8307,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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-03-22 2:22 Jiapeng Chong
0 siblings, 0 replies; 19+ messages in thread
From: Jiapeng Chong @ 2021-03-22 2:22 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c:875:62-67: WARNING:
conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
index 3e6f760..5692a8b 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
@@ -872,7 +872,7 @@ bool mpc3_program_shaper(
else
next_mode = LUT_RAM_A;
- mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A ? true:false, rmu_idx);
+ mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A, rmu_idx);
if (next_mode == LUT_RAM_A)
mpc3_program_shaper_luta_settings(mpc, params, rmu_idx);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-03-18 2:36 Jiapeng Chong
2021-03-18 3:11 ` Alex Deucher
0 siblings, 1 reply; 19+ messages in thread
From: Jiapeng Chong @ 2021-03-18 2:36 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c:220:65-70:
WARNING: conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c
index 8593145..3fe9e41 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c
@@ -217,7 +217,7 @@ static bool dwb3_program_ogam_lut(
else
next_mode = LUT_RAM_A;
- dwb3_configure_ogam_lut(dwbc30, next_mode == LUT_RAM_A ? true : false);
+ dwb3_configure_ogam_lut(dwbc30, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
dwb3_program_ogam_luta_settings(dwbc30, params);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] drm/amd/display: Remove unnecessary conversion to bool
2021-03-18 2:36 Jiapeng Chong
@ 2021-03-18 3:11 ` Alex Deucher
0 siblings, 0 replies; 19+ messages in thread
From: Alex Deucher @ 2021-03-18 3:11 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Leo (Sunpeng) Li, LKML, Maling list - DRI developers,
Dave Airlie, amd-gfx list, Deucher, Alexander, Christian Koenig
On Wed, Mar 17, 2021 at 10:37 PM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c:220:65-70:
> WARNING: conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Applied. Thanks. In general, you can just roll up most these bool
conversion patches into larger patches; no need to fix them all one at
a time.
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c
> index 8593145..3fe9e41 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c
> @@ -217,7 +217,7 @@ static bool dwb3_program_ogam_lut(
> else
> next_mode = LUT_RAM_A;
>
> - dwb3_configure_ogam_lut(dwbc30, next_mode == LUT_RAM_A ? true : false);
> + dwb3_configure_ogam_lut(dwbc30, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_A)
> dwb3_program_ogam_luta_settings(dwbc30, params);
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-03-16 8:08 Jiapeng Chong
2021-03-18 3:09 ` Alex Deucher
0 siblings, 1 reply; 19+ messages in thread
From: Jiapeng Chong @ 2021-03-16 8:08 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:721:65-70: WARNING:
conversion to bool not needed here.
./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:1139:67-72: WARNING:
conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
index 6e864b1..434d3c4 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
@@ -718,7 +718,7 @@ bool dpp3_program_blnd_lut(
next_mode = LUT_RAM_B;
dpp3_power_on_blnd_lut(dpp_base, true);
- dpp3_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+ dpp3_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
dpp3_program_blnd_luta_settings(dpp_base, params);
@@ -1136,7 +1136,7 @@ bool dpp3_program_shaper(
else
next_mode = LUT_RAM_A;
- dpp3_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+ dpp3_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
dpp3_program_shaper_luta_settings(dpp_base, params);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] drm/amd/display: Remove unnecessary conversion to bool
2021-03-16 8:08 Jiapeng Chong
@ 2021-03-18 3:09 ` Alex Deucher
0 siblings, 0 replies; 19+ messages in thread
From: Alex Deucher @ 2021-03-18 3:09 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Leo (Sunpeng) Li, LKML, Maling list - DRI developers,
Dave Airlie, amd-gfx list, Deucher, Alexander, Christian Koenig
On Tue, Mar 16, 2021 at 4:09 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:721:65-70: WARNING:
> conversion to bool not needed here.
>
> ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:1139:67-72: WARNING:
> conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
> index 6e864b1..434d3c4 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
> @@ -718,7 +718,7 @@ bool dpp3_program_blnd_lut(
> next_mode = LUT_RAM_B;
>
> dpp3_power_on_blnd_lut(dpp_base, true);
> - dpp3_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
> + dpp3_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_A)
> dpp3_program_blnd_luta_settings(dpp_base, params);
> @@ -1136,7 +1136,7 @@ bool dpp3_program_shaper(
> else
> next_mode = LUT_RAM_A;
>
> - dpp3_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
> + dpp3_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_A)
> dpp3_program_shaper_luta_settings(dpp_base, params);
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-03-15 8:22 Jiapeng Chong
2021-03-15 18:27 ` Alex Deucher
0 siblings, 1 reply; 19+ messages in thread
From: Jiapeng Chong @ 2021-03-15 8:22 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c:358:69-74: WARNING:
conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
index 3e6f760..e153109 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
@@ -355,7 +355,7 @@ void mpc3_set_output_gamma(
next_mode = LUT_RAM_A;
mpc3_power_on_ogam_lut(mpc, mpcc_id, true);
- mpc3_configure_ogam_lut(mpc, mpcc_id, next_mode == LUT_RAM_A ? true:false);
+ mpc3_configure_ogam_lut(mpc, mpcc_id, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
mpc3_program_luta(mpc, mpcc_id, params);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] drm/amd/display: Remove unnecessary conversion to bool
2021-03-15 8:22 Jiapeng Chong
@ 2021-03-15 18:27 ` Alex Deucher
0 siblings, 0 replies; 19+ messages in thread
From: Alex Deucher @ 2021-03-15 18:27 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Leo (Sunpeng) Li, LKML, Maling list - DRI developers,
Dave Airlie, amd-gfx list, Deucher, Alexander, Christian Koenig
Applied. Thanks!
Alex
On Mon, Mar 15, 2021 at 4:22 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c:358:69-74: WARNING:
> conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> index 3e6f760..e153109 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> @@ -355,7 +355,7 @@ void mpc3_set_output_gamma(
> next_mode = LUT_RAM_A;
>
> mpc3_power_on_ogam_lut(mpc, mpcc_id, true);
> - mpc3_configure_ogam_lut(mpc, mpcc_id, next_mode == LUT_RAM_A ? true:false);
> + mpc3_configure_ogam_lut(mpc, mpcc_id, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_A)
> mpc3_program_luta(mpc, mpcc_id, params);
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-03-09 8:02 Jiapeng Chong
0 siblings, 0 replies; 19+ messages in thread
From: Jiapeng Chong @ 2021-03-09 8:02 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c:896:68-73:
WARNING: conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
index 8dc3d1f..662ba74 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
@@ -893,7 +893,7 @@ bool dpp20_program_shaper(
else
next_mode = LUT_RAM_A;
- dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+ dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
dpp20_program_shaper_luta_settings(dpp_base, params);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-03-08 3:00 Jiapeng Chong
2021-03-08 21:56 ` Alex Deucher
0 siblings, 1 reply; 19+ messages in thread
From: Jiapeng Chong @ 2021-03-08 3:00 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c:561:34-39: WARNING:
conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
index ae6484a..42a4177 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
@@ -558,7 +558,7 @@ bool dal_ddc_service_query_ddc_data(
/* should not set mot (middle of transaction) to 0
* if there are pending read payloads
*/
- payload.mot = read_size == 0 ? false : true;
+ payload.mot = !(read_size == 0);
payload.length = write_size;
payload.data = write_buf;
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] drm/amd/display: Remove unnecessary conversion to bool
2021-03-08 3:00 Jiapeng Chong
@ 2021-03-08 21:56 ` Alex Deucher
0 siblings, 0 replies; 19+ messages in thread
From: Alex Deucher @ 2021-03-08 21:56 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Leo (Sunpeng) Li, LKML, Maling list - DRI developers,
Dave Airlie, amd-gfx list, Deucher, Alexander, Christian Koenig
On Sun, Mar 7, 2021 at 10:00 PM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c:561:34-39: WARNING:
> conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
This patch was already applied.
Alex
> ---
> drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
> index ae6484a..42a4177 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
> @@ -558,7 +558,7 @@ bool dal_ddc_service_query_ddc_data(
> /* should not set mot (middle of transaction) to 0
> * if there are pending read payloads
> */
> - payload.mot = read_size == 0 ? false : true;
> + payload.mot = !(read_size == 0);
> payload.length = write_size;
> payload.data = write_buf;
>
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-03-01 6:49 Jiapeng Chong
2021-03-02 18:21 ` Alex Deucher
0 siblings, 1 reply; 19+ messages in thread
From: Jiapeng Chong @ 2021-03-01 6:49 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c:298:33-38:
WARNING: conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
index 3398540..fbefbba 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
@@ -295,7 +295,7 @@ bool dpp3_program_gamcor_lut(
cm_helper_program_gamcor_xfer_func(dpp_base->ctx, params, &gam_regs);
dpp3_program_gammcor_lut(dpp_base, params->rgb_resulted, params->hw_points_num,
- next_mode == LUT_RAM_A ? true:false);
+ next_mode == LUT_RAM_A);
//select Gamma LUT to use for next frame
REG_UPDATE(CM_GAMCOR_CONTROL, CM_GAMCOR_SELECT, next_mode == LUT_RAM_A ? 0:1);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] drm/amd/display: Remove unnecessary conversion to bool
2021-03-01 6:49 Jiapeng Chong
@ 2021-03-02 18:21 ` Alex Deucher
0 siblings, 0 replies; 19+ messages in thread
From: Alex Deucher @ 2021-03-02 18:21 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Leo (Sunpeng) Li, LKML, Maling list - DRI developers,
Dave Airlie, amd-gfx list, Deucher, Alexander, Christian Koenig
Applied. Thanks!
Alex
On Mon, Mar 1, 2021 at 1:50 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c:298:33-38:
> WARNING: conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> index 3398540..fbefbba 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> @@ -295,7 +295,7 @@ bool dpp3_program_gamcor_lut(
> cm_helper_program_gamcor_xfer_func(dpp_base->ctx, params, &gam_regs);
>
> dpp3_program_gammcor_lut(dpp_base, params->rgb_resulted, params->hw_points_num,
> - next_mode == LUT_RAM_A ? true:false);
> + next_mode == LUT_RAM_A);
>
> //select Gamma LUT to use for next frame
> REG_UPDATE(CM_GAMCOR_CONTROL, CM_GAMCOR_SELECT, next_mode == LUT_RAM_A ? 0:1);
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: remove unnecessary conversion to bool
@ 2021-02-25 9:19 Jiapeng Chong
2021-02-25 21:30 ` Alex Deucher
0 siblings, 1 reply; 19+ messages in thread
From: Jiapeng Chong @ 2021-02-25 9:19 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c:243:67-72:
WARNING: conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
index 3398540..102f6a0 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
@@ -240,7 +240,7 @@ bool dpp3_program_gamcor_lut(
next_mode = LUT_RAM_A;
dpp3_power_on_gamcor_lut(dpp_base, true);
- dpp3_configure_gamcor_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+ dpp3_configure_gamcor_lut(dpp_base, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_B) {
gam_regs.start_cntl_b = REG(CM_GAMCOR_RAMB_START_CNTL_B);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] drm/amd/display: remove unnecessary conversion to bool
2021-02-25 9:19 [PATCH] drm/amd/display: remove " Jiapeng Chong
@ 2021-02-25 21:30 ` Alex Deucher
0 siblings, 0 replies; 19+ messages in thread
From: Alex Deucher @ 2021-02-25 21:30 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Leo (Sunpeng) Li, LKML, Maling list - DRI developers,
Dave Airlie, amd-gfx list, Deucher, Alexander, Christian Koenig
On Thu, Feb 25, 2021 at 4:19 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c:243:67-72:
> WARNING: conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> index 3398540..102f6a0 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> @@ -240,7 +240,7 @@ bool dpp3_program_gamcor_lut(
> next_mode = LUT_RAM_A;
>
> dpp3_power_on_gamcor_lut(dpp_base, true);
> - dpp3_configure_gamcor_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
> + dpp3_configure_gamcor_lut(dpp_base, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_B) {
> gam_regs.start_cntl_b = REG(CM_GAMCOR_RAMB_START_CNTL_B);
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-02-23 6:13 Jiapeng Chong
2021-02-23 16:02 ` Alex Deucher
0 siblings, 1 reply; 19+ messages in thread
From: Jiapeng Chong @ 2021-02-23 6:13 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8260:16-21: WARNING:
conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@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 94cd5dd..323473d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8253,8 +8253,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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] drm/amd/display: Remove unnecessary conversion to bool
2021-02-23 6:13 [PATCH] drm/amd/display: Remove " Jiapeng Chong
@ 2021-02-23 16:02 ` Alex Deucher
0 siblings, 0 replies; 19+ messages in thread
From: Alex Deucher @ 2021-02-23 16:02 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Leo (Sunpeng) Li, LKML, Maling list - DRI developers,
Dave Airlie, amd-gfx list, Deucher, Alexander, Christian Koenig
This was already fixed by a patch from Yang Li <yang.lee@linux.alibaba.com>.
Alex
On Tue, Feb 23, 2021 at 1:13 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8260:16-21: WARNING:
> conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@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 94cd5dd..323473d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -8253,8 +8253,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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] drm/amd/display: Remove unnecessary conversion to bool
@ 2021-02-20 7:40 Jiapeng Chong
0 siblings, 0 replies; 19+ messages in thread
From: Jiapeng Chong @ 2021-02-20 7:40 UTC (permalink / raw)
To: harry.wentland
Cc: Jiapeng Chong, sunpeng.li, linux-kernel, amd-gfx, airlied,
dri-devel, alexander.deucher, christian.koenig
Fix the following coccicheck warnings:
./drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c:270:16-21: WARNING:
conversion to bool not needed here.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
index 17e84f3..449fcd4 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
@@ -266,8 +266,7 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub,
copy_settings_data->frame_cap_ind = psr_context->psrFrameCaptureIndicationReq;
copy_settings_data->init_sdp_deadline = psr_context->sdpTransmitLineNumDeadline;
copy_settings_data->debug.u32All = 0;
- copy_settings_data->debug.bitfields.visual_confirm = dc->dc->debug.visual_confirm == VISUAL_CONFIRM_PSR ?
- true : false;
+ copy_settings_data->debug.bitfields.visual_confirm = dc->dc->debug.visual_confirm == VISUAL_CONFIRM_PSR;
copy_settings_data->debug.bitfields.use_hw_lock_mgr = 1;
dc_dmub_srv_cmd_queue(dc->dmub_srv, &cmd);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
end of thread, other threads:[~2021-03-22 2:22 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 6:40 [PATCH] drm/amd/display: Remove unnecessary conversion to bool Jiapeng Chong
2021-03-05 19:14 ` Alex Deucher
-- strict thread matches above, loose matches on Subject: below --
2021-03-22 2:22 Jiapeng Chong
2021-03-18 2:36 Jiapeng Chong
2021-03-18 3:11 ` Alex Deucher
2021-03-16 8:08 Jiapeng Chong
2021-03-18 3:09 ` Alex Deucher
2021-03-15 8:22 Jiapeng Chong
2021-03-15 18:27 ` Alex Deucher
2021-03-09 8:02 Jiapeng Chong
2021-03-08 3:00 Jiapeng Chong
2021-03-08 21:56 ` Alex Deucher
2021-03-01 6:49 Jiapeng Chong
2021-03-02 18:21 ` Alex Deucher
2021-02-25 9:19 [PATCH] drm/amd/display: remove " Jiapeng Chong
2021-02-25 21:30 ` Alex Deucher
2021-02-23 6:13 [PATCH] drm/amd/display: Remove " Jiapeng Chong
2021-02-23 16:02 ` Alex Deucher
2021-02-20 7:40 Jiapeng Chong
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).