lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 12 May 2023 10:04:57 -0400
From:   Hamza Mahfooz <hamza.mahfooz@....com>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        harry.wentland@....com
Cc:     sunpeng.li@....com, Abaci Robot <abaci@...ux.alibaba.com>,
        Xinhui.Pan@....com, Rodrigo.Siqueira@....com,
        linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org, daniel@...ll.ch,
        alexander.deucher@....com, airlied@...il.com,
        christian.koenig@....com
Subject: Re: [PATCH] drm/amd/display: Simplify the calculation of variables

On 5/12/23 03:04, Jiapeng Chong wrote:
> ./drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c:586:37-39: WARNING !A || A && B is equivalent to !A || B.
> ./drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c:595:37-39: WARNING !A || A && B is equivalent to !A || B.
> 
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4941
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>

Applied, thanks!

> ---
>   drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> 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 4950eaa4406b..2de910e0ce75 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
> @@ -583,8 +583,8 @@ void dcn32_update_force_pstate(struct dc *dc, struct dc_state *context)
>   		struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
>   		struct hubp *hubp = pipe->plane_res.hubp;
>   
> -		if (!pipe->stream || (pipe->stream && !(pipe->stream->mall_stream_config.type == SUBVP_MAIN ||
> -						pipe->stream->fpo_in_use))) {
> +		if (!pipe->stream || !(pipe->stream->mall_stream_config.type == SUBVP_MAIN ||
> +		    pipe->stream->fpo_in_use)) {
>   			if (hubp && hubp->funcs->hubp_update_force_pstate_disallow)
>   				hubp->funcs->hubp_update_force_pstate_disallow(hubp, false);
>   		}
> @@ -592,7 +592,7 @@ void dcn32_update_force_pstate(struct dc *dc, struct dc_state *context)
>   		/* Today only FPO uses cursor P-State force. Only clear cursor P-State force
>   		 * if it's not FPO.
>   		 */
> -		if (!pipe->stream || (pipe->stream && !pipe->stream->fpo_in_use)) {
> +		if (!pipe->stream || !pipe->stream->fpo_in_use) {
>   			if (hubp && hubp->funcs->hubp_update_force_cursor_pstate_disallow)
>   				hubp->funcs->hubp_update_force_cursor_pstate_disallow(hubp, false);
>   		}
-- 
Hamza

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ