* [PATCH -next] drm/amd/display: Simplify bool conversion
@ 2023-08-16 0:46 Yang Li
2023-08-16 15:57 ` SHANMUGAM, SRINIVASAN
0 siblings, 1 reply; 11+ messages in thread
From: Yang Li @ 2023-08-16 0:46 UTC (permalink / raw)
To: airlied, daniel, alexander.deucher, harry.wentland, Rodrigo.Siqueira
Cc: amd-gfx, dri-devel, linux-kernel, Yang Li
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c:94:102-107: WARNING: conversion to bool not needed here
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c:102:72-77: WARNING: conversion to bool not needed here
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
index 32d3086c4cb7..5ce542b1f860 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
@@ -91,7 +91,7 @@ bool amdgpu_dm_setup_replay(struct dc_link *link, struct amdgpu_dm_connector *ac
pr_config.replay_supported = true;
pr_config.replay_power_opt_supported = 0;
pr_config.replay_enable_option |= pr_enable_option_static_screen;
- pr_config.replay_timing_sync_supported = aconnector->max_vfreq >= 2 * aconnector->min_vfreq ? true : false;
+ pr_config.replay_timing_sync_supported = aconnector->max_vfreq >= 2 * aconnector->min_vfreq;
if (!pr_config.replay_timing_sync_supported)
pr_config.replay_enable_option &= ~pr_enable_option_general_ui;
@@ -99,7 +99,7 @@ bool amdgpu_dm_setup_replay(struct dc_link *link, struct amdgpu_dm_connector *ac
debug_flags = (union replay_debug_flags *)&pr_config.debug_flags;
debug_flags->u32All = 0;
debug_flags->bitfields.visual_confirm =
- link->ctx->dc->debug.visual_confirm == VISUAL_CONFIRM_REPLAY ? true : false;
+ link->ctx->dc->debug.visual_confirm == VISUAL_CONFIRM_REPLAY;
link->replay_settings.replay_feature_enabled = true;
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 11+ messages in thread
* RE: [PATCH -next] drm/amd/display: Simplify bool conversion
2023-08-16 0:46 [PATCH -next] drm/amd/display: Simplify bool conversion Yang Li
@ 2023-08-16 15:57 ` SHANMUGAM, SRINIVASAN
0 siblings, 0 replies; 11+ messages in thread
From: SHANMUGAM, SRINIVASAN @ 2023-08-16 15:57 UTC (permalink / raw)
To: Yang Li, airlied, daniel, Deucher, Alexander, Wentland, Harry,
Siqueira, Rodrigo
Cc: dri-devel, amd-gfx, linux-kernel
[AMD Official Use Only - General]
Thanks Li, for the fix, the fix is already in process of merging into amd-staging-drm-next.
https://patchwork.freedesktop.org/patch/552568/
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Yang Li
Sent: Wednesday, August 16, 2023 6:16 AM
To: airlied@gmail.com; daniel@ffwll.ch; Deucher, Alexander <Alexander.Deucher@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>
Cc: Yang Li <yang.lee@linux.alibaba.com>; dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; linux-kernel@vger.kernel.org
Subject: [PATCH -next] drm/amd/display: Simplify bool conversion
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c:94:102-107: WARNING: conversion to bool not needed here
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c:102:72-77: WARNING: conversion to bool not needed here
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
index 32d3086c4cb7..5ce542b1f860 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
@@ -91,7 +91,7 @@ bool amdgpu_dm_setup_replay(struct dc_link *link, struct amdgpu_dm_connector *ac
pr_config.replay_supported = true;
pr_config.replay_power_opt_supported = 0;
pr_config.replay_enable_option |= pr_enable_option_static_screen;
- pr_config.replay_timing_sync_supported = aconnector->max_vfreq >= 2 * aconnector->min_vfreq ? true : false;
+ pr_config.replay_timing_sync_supported = aconnector->max_vfreq >= 2 *
+aconnector->min_vfreq;
if (!pr_config.replay_timing_sync_supported)
pr_config.replay_enable_option &= ~pr_enable_option_general_ui; @@ -99,7 +99,7 @@ bool amdgpu_dm_setup_replay(struct dc_link *link, struct amdgpu_dm_connector *ac
debug_flags = (union replay_debug_flags *)&pr_config.debug_flags;
debug_flags->u32All = 0;
debug_flags->bitfields.visual_confirm =
- link->ctx->dc->debug.visual_confirm == VISUAL_CONFIRM_REPLAY ? true : false;
+ link->ctx->dc->debug.visual_confirm == VISUAL_CONFIRM_REPLAY;
link->replay_settings.replay_feature_enabled = true;
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH -next] drm/amd/display: Simplify bool conversion
2023-10-18 1:22 Yang Li
@ 2023-10-18 14:00 ` Alex Deucher
0 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2023-10-18 14:00 UTC (permalink / raw)
To: Yang Li
Cc: alexander.deucher, harry.wentland, airlied, daniel, Abaci Robot,
dri-devel, amd-gfx, linux-kernel
Applied. Thanks!
On Tue, Oct 17, 2023 at 9:22 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> ./drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c:4802:84-89: WARNING: conversion to bool not needed here
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6901
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
> index 851db026f251..3296c078ff3e 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
> @@ -4799,7 +4799,7 @@ static void CalculateSurfaceSizeInMall(
> if (UseMALLForStaticScreen[k] == dml_use_mall_static_screen_enable)
> TotalSurfaceSizeInMALL = TotalSurfaceSizeInMALL + SurfaceSizeInMALL[k];
> }
> - *ExceededMALLSize = (TotalSurfaceSizeInMALL <= MALLAllocatedForDCN * 1024 * 1024 ? false : true);
> + *ExceededMALLSize = (TotalSurfaceSizeInMALL > MALLAllocatedForDCN * 1024 * 1024);
> } // CalculateSurfaceSizeInMall
>
> static void CalculateDETBufferSize(
> --
> 2.20.1.7.g153144c
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH -next] drm/amd/display: Simplify bool conversion
@ 2023-10-18 1:22 Yang Li
2023-10-18 14:00 ` Alex Deucher
0 siblings, 1 reply; 11+ messages in thread
From: Yang Li @ 2023-10-18 1:22 UTC (permalink / raw)
To: alexander.deucher, harry.wentland, airlied, daniel
Cc: amd-gfx, dri-devel, linux-kernel, Yang Li, Abaci Robot
./drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c:4802:84-89: WARNING: conversion to bool not needed here
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6901
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
index 851db026f251..3296c078ff3e 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
@@ -4799,7 +4799,7 @@ static void CalculateSurfaceSizeInMall(
if (UseMALLForStaticScreen[k] == dml_use_mall_static_screen_enable)
TotalSurfaceSizeInMALL = TotalSurfaceSizeInMALL + SurfaceSizeInMALL[k];
}
- *ExceededMALLSize = (TotalSurfaceSizeInMALL <= MALLAllocatedForDCN * 1024 * 1024 ? false : true);
+ *ExceededMALLSize = (TotalSurfaceSizeInMALL > MALLAllocatedForDCN * 1024 * 1024);
} // CalculateSurfaceSizeInMall
static void CalculateDETBufferSize(
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH -next] drm/amd/display: Simplify bool conversion
2023-02-10 0:58 Yang Li
@ 2023-02-13 16:13 ` Alex Deucher
0 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2023-02-13 16:13 UTC (permalink / raw)
To: Yang Li
Cc: alexander.deucher, sunpeng.li, Xinhui.Pan, Rodrigo.Siqueira,
linux-kernel, amd-gfx, Abaci Robot, dri-devel, christian.koenig
Applied. Thanks.
On Thu, Feb 9, 2023 at 7:59 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> ./drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c:1610:68-73: WARNING: conversion to bool not needed here
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4025
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> .../gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> index 24d356ebd7a9..cb38afde3fc8 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> @@ -1607,7 +1607,7 @@ static bool retrieve_link_cap(struct dc_link *link)
> dpcd_data[DP_TRAINING_AUX_RD_INTERVAL];
>
> link->dpcd_caps.ext_receiver_cap_field_present =
> - aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1 ? true:false;
> + aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1;
>
> if (aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1) {
> uint8_t ext_cap_data[16];
> --
> 2.20.1.7.g153144c
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH -next] drm/amd/display: Simplify bool conversion
@ 2023-02-10 0:58 Yang Li
2023-02-13 16:13 ` Alex Deucher
0 siblings, 1 reply; 11+ messages in thread
From: Yang Li @ 2023-02-10 0:58 UTC (permalink / raw)
To: alexander.deucher
Cc: harry.wentland, sunpeng.li, Rodrigo.Siqueira, christian.koenig,
Xinhui.Pan, airlied, daniel, amd-gfx, dri-devel, linux-kernel,
Yang Li, Abaci Robot
./drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c:1610:68-73: WARNING: conversion to bool not needed here
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4025
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
.../gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
index 24d356ebd7a9..cb38afde3fc8 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
@@ -1607,7 +1607,7 @@ static bool retrieve_link_cap(struct dc_link *link)
dpcd_data[DP_TRAINING_AUX_RD_INTERVAL];
link->dpcd_caps.ext_receiver_cap_field_present =
- aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1 ? true:false;
+ aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1;
if (aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1) {
uint8_t ext_cap_data[16];
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH -next] drm/amd/display: Simplify bool conversion
2022-10-11 15:27 ` Harry Wentland
@ 2022-10-11 15:58 ` Alex Deucher
0 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2022-10-11 15:58 UTC (permalink / raw)
To: Harry Wentland
Cc: Yang Li, alexander.deucher, sunpeng.li, Abaci Robot, Xinhui.Pan,
Rodrigo.Siqueira, linux-kernel, amd-gfx, dri-devel, daniel,
airlied, christian.koenig
Applied. Thanks!
Alex
On Tue, Oct 11, 2022 at 11:27 AM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2022-10-10 03:38, Yang Li wrote:
> > The result of 'pwr_status == 0' is Boolean, and the question mark
> > expression is redundant.
> >
> > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2354
> > Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> > index 955ca273cfe1..cbda458bf040 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> > @@ -1401,7 +1401,7 @@ bool dcn32_dsc_pg_status(
> > break;
> > }
> >
> > - return pwr_status == 0 ? true : false;
> > + return pwr_status == 0;
> > }
> >
> > void dcn32_update_dsc_pg(struct dc *dc,
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH -next] drm/amd/display: Simplify bool conversion
2022-10-10 7:38 Yang Li
@ 2022-10-11 15:27 ` Harry Wentland
2022-10-11 15:58 ` Alex Deucher
0 siblings, 1 reply; 11+ messages in thread
From: Harry Wentland @ 2022-10-11 15:27 UTC (permalink / raw)
To: Yang Li, alexander.deucher
Cc: sunpeng.li, Rodrigo.Siqueira, christian.koenig, Xinhui.Pan,
airlied, daniel, amd-gfx, dri-devel, linux-kernel, Abaci Robot
On 2022-10-10 03:38, Yang Li wrote:
> The result of 'pwr_status == 0' is Boolean, and the question mark
> expression is redundant.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2354
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> index 955ca273cfe1..cbda458bf040 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> @@ -1401,7 +1401,7 @@ bool dcn32_dsc_pg_status(
> break;
> }
>
> - return pwr_status == 0 ? true : false;
> + return pwr_status == 0;
> }
>
> void dcn32_update_dsc_pg(struct dc *dc,
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH -next] drm/amd/display: Simplify bool conversion
@ 2022-10-10 7:38 Yang Li
2022-10-11 15:27 ` Harry Wentland
0 siblings, 1 reply; 11+ messages in thread
From: Yang Li @ 2022-10-10 7:38 UTC (permalink / raw)
To: alexander.deucher
Cc: harry.wentland, sunpeng.li, Rodrigo.Siqueira, christian.koenig,
Xinhui.Pan, airlied, daniel, amd-gfx, dri-devel, linux-kernel,
Yang Li, Abaci Robot
The result of 'pwr_status == 0' is Boolean, and the question mark
expression is redundant.
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2354
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
index 955ca273cfe1..cbda458bf040 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
@@ -1401,7 +1401,7 @@ bool dcn32_dsc_pg_status(
break;
}
- return pwr_status == 0 ? true : false;
+ return pwr_status == 0;
}
void dcn32_update_dsc_pg(struct dc *dc,
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH -next] drm/amd/display: Simplify bool conversion
2022-09-01 8:11 Yang Li
@ 2022-09-09 20:43 ` Alex Deucher
0 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2022-09-09 20:43 UTC (permalink / raw)
To: Yang Li
Cc: alexander.deucher, sunpeng.li, Abaci Robot, Xinhui.Pan,
Rodrigo.Siqueira, linux-kernel, amd-gfx, airlied, dri-devel,
christian.koenig
Applied. Thanks!
On Thu, Sep 1, 2022 at 4:11 AM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> The result of relational operation is Boolean, and the question mark
> expression is redundant.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2027
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> index dc501ee7d01a..e4fd540dec0f 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> @@ -1873,7 +1873,7 @@ void dml32_CalculateSurfaceSizeInMall(
> if (UseMALLForStaticScreen[k] == dm_use_mall_static_screen_enable)
> TotalSurfaceSizeInMALL = TotalSurfaceSizeInMALL + SurfaceSizeInMALL[k];
> }
> - *ExceededMALLSize = (TotalSurfaceSizeInMALL <= MALLAllocatedForDCN * 1024 * 1024 ? false : true);
> + *ExceededMALLSize = (TotalSurfaceSizeInMALL > MALLAllocatedForDCN * 1024 * 1024);
> } // CalculateSurfaceSizeInMall
>
> void dml32_CalculateVMRowAndSwath(
> --
> 2.20.1.7.g153144c
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH -next] drm/amd/display: Simplify bool conversion
@ 2022-09-01 8:11 Yang Li
2022-09-09 20:43 ` Alex Deucher
0 siblings, 1 reply; 11+ messages in thread
From: Yang Li @ 2022-09-01 8:11 UTC (permalink / raw)
To: alexander.deucher
Cc: harry.wentland, sunpeng.li, Rodrigo.Siqueira, christian.koenig,
Xinhui.Pan, airlied, daniel, amd-gfx, dri-devel, linux-kernel,
Yang Li, Abaci Robot
The result of relational operation is Boolean, and the question mark
expression is redundant.
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2027
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
.../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
index dc501ee7d01a..e4fd540dec0f 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
@@ -1873,7 +1873,7 @@ void dml32_CalculateSurfaceSizeInMall(
if (UseMALLForStaticScreen[k] == dm_use_mall_static_screen_enable)
TotalSurfaceSizeInMALL = TotalSurfaceSizeInMALL + SurfaceSizeInMALL[k];
}
- *ExceededMALLSize = (TotalSurfaceSizeInMALL <= MALLAllocatedForDCN * 1024 * 1024 ? false : true);
+ *ExceededMALLSize = (TotalSurfaceSizeInMALL > MALLAllocatedForDCN * 1024 * 1024);
} // CalculateSurfaceSizeInMall
void dml32_CalculateVMRowAndSwath(
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-10-18 14:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16 0:46 [PATCH -next] drm/amd/display: Simplify bool conversion Yang Li
2023-08-16 15:57 ` SHANMUGAM, SRINIVASAN
-- strict thread matches above, loose matches on Subject: below --
2023-10-18 1:22 Yang Li
2023-10-18 14:00 ` Alex Deucher
2023-02-10 0:58 Yang Li
2023-02-13 16:13 ` Alex Deucher
2022-10-10 7:38 Yang Li
2022-10-11 15:27 ` Harry Wentland
2022-10-11 15:58 ` Alex Deucher
2022-09-01 8:11 Yang Li
2022-09-09 20:43 ` 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).