Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3182708ioa; Mon, 25 Apr 2022 20:36:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm4MACNgt62jsduv1PO7pgafOyfQieVpGFl0TA5N2AvqBZlOiH1Wf74XnAAXMMSYFAMEAv X-Received: by 2002:a17:902:7205:b0:156:1a0a:2c39 with SMTP id ba5-20020a170902720500b001561a0a2c39mr21357051plb.88.1650944195053; Mon, 25 Apr 2022 20:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650944195; cv=none; d=google.com; s=arc-20160816; b=zPk1YUNo3WPCTlriJbJ5ckcJdd7IPYJ608egWvW9ap02E813nMIIMvumgXrfc9K5I6 6GMQJWWAugskUYiVA4gHQn/6tF3dvpV0EfAW3FI3BXUtr7RJFsqmo4qjrj5kZUVShhma PwK3p2bLacJnej5JzpeYj+zzch7bh8AhI4Eqk5T29ZijudUH/Y4GYaVGPCIRSkT5QHlD JQ73+Td2CkabjiwhGsj+fLdn5XJ30FhJ0c0rOykOC39ddL4YjMSPNM8S3mabf8CPk5hl hmPz6z5bQj3TKjAFKzJch17ChHftB8vUH9QrvDdj6qmD/p2mhdgtWR0a6RejNn9IGcZV lHzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VRxcdf2w/jvgBn/u4RdkEXeiNvH19TSLvJDSRvR1heQ=; b=HaL4yUMpiuL1vGPF7rEb8fUt97VOmuwM/piWoUIjPlhg7T/6/qI9EpxIsz9R6w3yqQ JsR1MvrMqtwgS5v9FvviEJBEDGPtnQDdJSLTX1Ixf6c1+cZp2YkSLOfg1GOK6r9Lz9+x PvQWDHA0kmFEhNlhAt//7KyAV0glkT1rVYUTLum8asUtuZPJlBsreqvC2f4IdxMyK5HL xUbBV7PEKT2a+9/igrOSrqYeuFcUDZ190oBAiHjw7FKAcKjPEONbKKhYrMbCnw7LcVEP jcseOS24VeKKrsg4ayQs4IR9416SVlHqsf2kNDW5d1D1FUEq6DJm0v56T68ZNRYEm4u1 5acg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JmheJvyr; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i190-20020a6387c7000000b003ab1f09b880si6450802pge.694.2022.04.25.20.36.16; Mon, 25 Apr 2022 20:36:35 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JmheJvyr; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237000AbiDYW1E (ORCPT + 99 others); Mon, 25 Apr 2022 18:27:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343641AbiDYV6y (ORCPT ); Mon, 25 Apr 2022 17:58:54 -0400 Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 276AB3298E for ; Mon, 25 Apr 2022 14:55:49 -0700 (PDT) Received: by mail-oo1-xc36.google.com with SMTP id g30-20020a4a251e000000b0033a39d8340aso3046944ooa.5 for ; Mon, 25 Apr 2022 14:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VRxcdf2w/jvgBn/u4RdkEXeiNvH19TSLvJDSRvR1heQ=; b=JmheJvyryMJtpqVWc5yk3qs+kDpkw5/AYBwMAAJ9S/yHT7qWf0WgTM5yH157BCuqqz ABnLL4htcJOjrRMHGRMc0eEg5K2G2FmWdA78ERk4N6OdcIVCDKjVMmbdbSviBlS856Wh 5BrKL7kdyoG2wunDb0si928fF0y/g784bnByLh1ogTWakYahSOIqlRa2nzX62hShABDS WMIasoWg1V+K+1wex8bvsNtfzwf0McLxCG8HFL6Zv8fgstAKPaJzHBGvZmqJrtcxi1Tx nX5msTlvEb6cEkHd+meuTJrm69i2LeU5v9S0wjVeJMlDfVsyKoSwzXy0yyI3onsZj/b3 T1Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VRxcdf2w/jvgBn/u4RdkEXeiNvH19TSLvJDSRvR1heQ=; b=cXicOT+104CfrpHKVPTM02rckpLB2wTJXXZNPfjR0iHpC4bSEoso1IYxeC5H+zloCs 67YFnJobvTjt8fHERckog45WI7QPg6GHSHQuEQesV8j2zqRtI/doa21AWz7oey9RJyFp WUjZ80vkO2dPkmoONwI7fHxlpEuvwd0XsyyyQdk9H90/v4RJzGppxyhLlE1yJYt+XfD3 qm87cCzBpO4df35/AfGfd7cw7j54PIAO7rK4+I/u5pKrZW/Xh78AXIWgm47qPRz13Raw ZLgqQwpQSrPdhgvLBXksYSJPW14O3P0V2zZNp+rphprv41y5tR4YhUqFTdYfKzGf1VPN nUGg== X-Gm-Message-State: AOAM533BdT1sn8ZPXw20B9snqcGZHQMQd7Evev8z/dAZV7ZVsUt7NVFW WN90jrGD1DcX2Cq4LHf3hiz3Een6Vv5txWv2FwA= X-Received: by 2002:a4a:5257:0:b0:33a:48e1:8e75 with SMTP id d84-20020a4a5257000000b0033a48e18e75mr7125313oob.68.1650923748478; Mon, 25 Apr 2022 14:55:48 -0700 (PDT) MIME-Version: 1.0 References: <20220424090640.1865-1-guozhengkui@vivo.com> In-Reply-To: From: Alex Deucher Date: Mon, 25 Apr 2022 17:55:35 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: fix if == else warning To: "Liu, Zhan" Cc: Guo Zhengkui , "Wentland, Harry" , "Li, Sun peng (Leo)" , "Siqueira, Rodrigo" , "Deucher, Alexander" , "Koenig, Christian" , "Pan, Xinhui" , David Airlie , Daniel Vetter , "Liu, Charlene" , "Lei, Jun" , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , "open list:AMD DISPLAY CORE" , "open list:DRM DRIVERS" , open list , "zhengkui_guo@outlook.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Applied. Thanks! Alex On Sun, Apr 24, 2022 at 4:15 PM Liu, Zhan wrote: > > [AMD Official Use Only - General] > > > -----Original Message----- > > From: Guo Zhengkui > > Sent: 2022/April/24, Sunday 5:06 AM > > To: Wentland, Harry ; Li, Sun peng (Leo) > > ; Siqueira, Rodrigo ; > > Deucher, Alexander ; Koenig, Christian > > ; Pan, Xinhui ; David Air= lie > > ; Daniel Vetter ; Liu, Charlene > > ; Lei, Jun ; Guo Zhengkui > > ; Liu, Zhan ; Jos=C3=A9 Exp=C3= =B3sito > > ; open list:AMD DISPLAY CORE > gfx@lists.freedesktop.org>; open list:DRM DRIVERS > devel@lists.freedesktop.org>; open list > > Cc: zhengkui_guo@outlook.com > > Subject: [PATCH] drm/amd/display: fix if =3D=3D else warning > > > > Fix the following coccicheck warning: > > > > drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c:98:8-10: > > WARNING: possible condition with no effect (if =3D=3D else) > > > > Signed-off-by: Guo Zhengkui > > Thanks a lot for fixing this warning. > > Reviewed-by: Zhan Liu > > > --- > > drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > > b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > > index fe22530242d2..05b3fba9ccce 100644 > > --- a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > > +++ b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > > @@ -95,8 +95,6 @@ static void gpu_addr_to_uma(struct dce_hwseq *hwseq, > > } else if (hwseq->fb_offset.quad_part <=3D addr->quad_part && > > addr->quad_part <=3D hwseq->uma_top.quad_part) { > > is_in_uma =3D true; > > - } else if (addr->quad_part =3D=3D 0) { > > - is_in_uma =3D false; > > } else { > > is_in_uma =3D false; > > } > > -- > > 2.20.1 >