Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9892678rwr; Fri, 12 May 2023 00:18:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5jPreh/rfUQ6G3KG74MlF9bxEvV/27ir5QTNKKyyprzzNTDt2PXdvJCigOcsUvJ9Jfq1UG X-Received: by 2002:a05:6a21:7891:b0:101:209e:bc57 with SMTP id bf17-20020a056a21789100b00101209ebc57mr16992864pzc.50.1683875919423; Fri, 12 May 2023 00:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683875919; cv=none; d=google.com; s=arc-20160816; b=B1vmPY8eORpTJaxayqYyCBH8ztsVo28hAQoKg1OX4eLk71xkAGEQxOC7gyPSC4HOo+ FlntRj92xvIqA8OQdLifol1jcpmw6Nx4DndDf1LIwswEVM/KVBm5Xx3ruEoblrzDQdlU xFrR48oTvxoMLaRwB3hIp7/dF6qY5I5JWPps2aSUTe0AEANFq4T1GWajdYjhOTq6ahMy 5n7/qjqoNbC6VC8w8lc30ZJvd+VGS5gbW57YHToAWPgwPZV/SCtKCWUq8OiRCKwl2kku Z/Om4jereU3LT4GjI7qjJ9UWEylw8kf71v968wJLxxFHY4y7kFlCA1O7BStsuUlgM+jZ 5Kvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=XEuSzN5HLrO19kiwKZJKV94Yulx+IcHUzIe9pGkuBjM=; b=oyhcXtEUZsekHEMtTiNGatok5fTK9j8Bfl69rqh6jjh3x5kAIlIetKaZw0v/EbsZIL uCIWoQgUSVMSXXOJHs2aLR4SD0FZjbhbJictQ9tJ2SNCTjwYfTOutney6UoiBENBNSh6 Flzf9S8/vXizynxtWnnw0zNKG7kILj6BCP/PKEqSTdXebBMdIF7DpgQxgWvts1oLT7z6 5V1qB1ZE2REO725pSU1MFg6MnqVzfu00xRxN04AnXs9deI2yoDYbhwmuIeY03/Eu8ael W0hTUiHn5DbZfc3+XR8QAlyKt8YWCrsYYQ7Ep7jt6MxUcfwRZcIDCQp7uSRWz8+yFzI2 Bh5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 130-20020a630288000000b0050c0a00c1edsi9000669pgc.703.2023.05.12.00.18.26; Fri, 12 May 2023 00:18:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240186AbjELHHb (ORCPT + 99 others); Fri, 12 May 2023 03:07:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240185AbjELHGY (ORCPT ); Fri, 12 May 2023 03:06:24 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7ABF106D2 for ; Fri, 12 May 2023 00:05:05 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0ViO3XFR_1683875093; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0ViO3XFR_1683875093) by smtp.aliyun-inc.com; Fri, 12 May 2023 15:05:01 +0800 From: Jiapeng Chong To: harry.wentland@amd.com Cc: sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] drm/amd/display: Simplify the calculation of variables Date: Fri, 12 May 2023 15:04:51 +0800 Message-Id: <20230512070451.107372-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ./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 Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4941 Signed-off-by: Jiapeng Chong --- 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); } -- 2.20.1.7.g153144c