2023-10-18 01:22:51

by Yang Li

[permalink] [raw]
Subject: [PATCH -next] drm/amd/display: Simplify bool conversion

./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 <[email protected]>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6901
Signed-off-by: Yang Li <[email protected]>
---
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


2023-10-18 14:01:17

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH -next] drm/amd/display: Simplify bool conversion

Applied. Thanks!

On Tue, Oct 17, 2023 at 9:22 PM Yang Li <[email protected]> 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 <[email protected]>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6901
> Signed-off-by: Yang Li <[email protected]>
> ---
> 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
>