Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2737117pxb; Mon, 25 Apr 2022 00:57:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDzuQzO95EzTUNU5yDDWJ83IRaSI4oB27w66coBGQKmbMXYRik+wVS6wM9l0k/cO+hdJ3m X-Received: by 2002:a65:638d:0:b0:39d:74ad:ce0b with SMTP id h13-20020a65638d000000b0039d74adce0bmr14313160pgv.103.1650873442748; Mon, 25 Apr 2022 00:57:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650873442; cv=pass; d=google.com; s=arc-20160816; b=iWygVWdiwIIBUlBzUhh5CcVFIojtitofqgHS2zY6WjdK7rnncHyFHBCEv2vlM5EG4Q eUXOLLAAZ1JmWqsONB29iluGHW53CtLgIRKyUK6HA7G0yCBe8gVlaj09dH8V9EOj+Aha Lm+lsn6yD/fDVz4msXq4i9sJOV2MWoPiM2JUbzI32Au3Q1xB1dRf7k9BOeEXf3WtBtW2 TTmWvpuF3Gs4g+3domFVMRIvg6BL67wCx81nOFVbYD1KQBzKWJ5I5EKED/gV4kWaEQyd gdHqkJiQ3JbgZ7MA3bMLzm+ZrbRrnbC0E5BMKk8umCt0L6zCp9d1i6pz4Qb1xDeGEwh6 V68g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=M6XocEDhVwdNVYEyIfpwMFBJPXnKy8tXrfrZ3mJVu38=; b=SMAphNC8S5LXeEcir58I50vQuY0ge5z7CkgYkk0RKDJuwP5VLL42FlgbPQJMfs0MYn QTlPHEnuvzdlGP5rKsxUmcD5jjJaFy2sh7tWPStN60TtRhw1jHrW1iycIpKafSBaB8rl x+Ek0U67IIicjRdgQ3JS6YPdWNU9ifr7scBjEQc6ba0s2lsD4KsKDKnUSchPGDpcNzMC eeKKBxpEv4pvjtXm3UYVZasD2i3GLi5BvwOcWEsYZem0gqXPaSsWR18hxqDxqjXtMknN hvWvMLpieTWsDEQIp859dY3i8c3f5NwKI6mKEGNigN9hoIY47yA13WfTlbb+Y/rVCKX2 8iUA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=5GD4bARy; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a17090a450200b001d75a3e38easi10032614pjg.41.2022.04.25.00.57.08; Mon, 25 Apr 2022 00:57:22 -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=@amd.com header.s=selector1 header.b=5GD4bARy; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239552AbiDXUS2 (ORCPT + 99 others); Sun, 24 Apr 2022 16:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239536AbiDXUSX (ORCPT ); Sun, 24 Apr 2022 16:18:23 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2071.outbound.protection.outlook.com [40.107.223.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11011AE79 for ; Sun, 24 Apr 2022 13:15:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ms4um4D+8HOTu+Ri1Jynzi4e9EguSkxe6blkUXHeP8xDhMU5r8Plh1VaQnsntooVROdwr9tdLqfJhRkdIlld7aQ/uS3447/xRUbnsdx3GsTN6aNwqnJ+Y3vHv8x2p0po9nCR9e4wOP8jzcbDEIX3dnpj2qsnmP8A6azjJQanLBIuAIMqXqvg048WhwzpODqMXE4w2NVdphv9cAzBIb2owyVFZ6s4emEhbex/+B+pxWMxgpDJ3F1wzPeLhAWLbY7y9F/SXSRyMCV/j+2fJX8ZlUnIALUyUEeAbQmK6gk3ijD07UqyNh48wfE9ASFmI5qzzy5yttV4eB+PO4c4p5Lfvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M6XocEDhVwdNVYEyIfpwMFBJPXnKy8tXrfrZ3mJVu38=; b=JGQGm+imFlOON75pAIiQK1au9tJ7FjeuYasj4H5nhPXTW0vr8GgQN3a9Ez2kJbuwJ7LBg2WC7cnd1C96niakY6iBxJGJe1utI4mzvAXtMWbAF8+T8xq2Z0/Cuikh+iFS2IL1OwrhWs20/KjgZIgvI42xf5BZuW2J21XbqhNT4T7hz1zePWKu9lLpb8Plt1mTGMlsS0gVV1rmxow2CgtzqSdDgk8JI+f2C6aCUgrNZoAlCIBUsOwWpkUkAitEmgGI1uENAmMbjfsc8+9xoDnxkd+s7RdUkamt3BdrvedVg2sOUtuzdmkSTP97KHcJiztIYvqGxIMvyPU20dUORkgpZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M6XocEDhVwdNVYEyIfpwMFBJPXnKy8tXrfrZ3mJVu38=; b=5GD4bARy28GMcNdSs7In+ESSdGGYY9PV/GSV8BaIfRg0fXWKP3NNOGAKOkJqdrofoAfHHpNtMQ/G8kw1MhffeM1SEQWSuB5eZ5o6+aVVbksY38b788UHHmmQtlcw7M5MG1mX8SJWLDq1/zrtP4w8wB1iqrVnYNJaBoeiid3cZ2M= Received: from DM4PR12MB5214.namprd12.prod.outlook.com (2603:10b6:5:395::22) by CY4PR12MB1349.namprd12.prod.outlook.com (2603:10b6:903:40::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Sun, 24 Apr 2022 20:15:16 +0000 Received: from DM4PR12MB5214.namprd12.prod.outlook.com ([fe80::a805:d518:afcb:4965]) by DM4PR12MB5214.namprd12.prod.outlook.com ([fe80::a805:d518:afcb:4965%5]) with mapi id 15.20.5186.021; Sun, 24 Apr 2022 20:15:16 +0000 From: "Liu, Zhan" To: Guo Zhengkui , "Wentland, Harry" , "Li, Sun peng (Leo)" , "Siqueira, Rodrigo" , "Deucher, Alexander" , "Koenig, Christian" , "Pan, Xinhui" , David Airlie , Daniel Vetter , "Liu, Charlene" , "Lei, Jun" , =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= , "open list:AMD DISPLAY CORE" , "open list:DRM DRIVERS" , open list CC: "zhengkui_guo@outlook.com" Subject: RE: [PATCH] drm/amd/display: fix if == else warning Thread-Topic: [PATCH] drm/amd/display: fix if == else warning Thread-Index: AQHYV7qv7thHdmRXJkie4zu+ewRH+qz/gGaw Date: Sun, 24 Apr 2022 20:15:15 +0000 Message-ID: References: <20220424090640.1865-1-guozhengkui@vivo.com> In-Reply-To: <20220424090640.1865-1-guozhengkui@vivo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=2940ef4c-806d-49dc-ad37-8ba4d9af77d5;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-04-24T20:14:40Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 437425b4-a468-41cf-7dbb-08da262f2575 x-ms-traffictypediagnostic: CY4PR12MB1349:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Zx90lYEe1uvUBSHaVM95v4WaCmNRGFI+WsxJqX9otoyIazNHoTPYCsqxf3mDDtF9rJuY0aUt52SPpd3D0smEKB8WyAzmPI+rMsjj9hTZh0ZCuS3LSlah2gciP42X823UWSqbkUECtCH3FPhPTvgXGCbUX8csmmAnSjws86irYuEd+Z2gkEEm8bGtt3ttdZ5+dCwxO/ST/irpvatk/4cIWf3I/nbVIT9TLY5sZxsRzLHALrBK2b4Pf2kDjK+q/wFse7XAYzRsudgGlomlao0PeDb4TgUUKCKqqXsEYYAMutoiFO3ICeffeODeQ0WnAJvR6GaLQv5ZP9nCmACquIj8Yvv5GoolTXt51JoJU7QoHnHIEdQgQ4zeKXlUcX6v5OsRdWmTO0hibmmbbNoddDA0ClNg9TauY6mib9YppGH9ok4cIAFqZ/mc54RsALdFpst70/rvyorrl209ns6ckI+JsibUuE+TY9bYGdAkCNRo3+rLkIE8jLiCPT+czTi/684F9xZ/W3owqduMmb20VkAfmKG+1eUoHlk7LetIa+rwuw/pRMg2D/8jDvWuHsX9tJT1X/Nj3BdDJDkOizQDYpz+8xTTy5Gbqv0+xIt+22C1eqHoV2UkCZS/KSRgSkXoWxyVec8QRwcV6BElJR1Bz9a4WPM95ns3FOp3AdTY/kAygNmuQfOGBwQMkkPxUQ894ccUXgtsn5OU6XrQjSOz5e/abhCSjNYJutpf25ZYFjMjnLo= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5214.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(2906002)(921005)(122000001)(33656002)(66946007)(71200400001)(5660300002)(55016003)(38070700005)(38100700002)(76116006)(316002)(110136005)(508600001)(45080400002)(8676002)(26005)(53546011)(86362001)(83380400001)(6506007)(7696005)(9686003)(8936002)(52536014)(66476007)(66446008)(64756008)(66556008)(4326008)(186003)(66574015);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?acLlxNWg30suGGFpXCahAlngB0Xib6VYX4zShmx34usNEfsjc+Vn/qMYCz?= =?iso-8859-1?Q?0mJaIdH4GOy2s3hRv9WbYE9Dmx3W6P/MuxzOhAXi3m5l4x0/NTel13ubkZ?= =?iso-8859-1?Q?BjCfLrtbYjB+NkswxvK7N8QidJunlVidvpCLxDNVwbWuI7ej2LKhcfXgwc?= =?iso-8859-1?Q?/JgD6choouP9hQgDxEfVu/8MnA0KHABiHzwWDEFlURk3h3aKzOhdboRhgu?= =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7UKTJ1A4KUeVrD1O?= =?iso-8859-1?Q?mV3JpCq/TsaIxojeZA/2S0VgigwS1rjfOKRbMUPiqsLYLd/wzIJurCoIyl?= =?iso-8859-1?Q?zzVuUvxXD7FK6cgqeVF9in07N1ER+uQeHznHWUjP6GOhvDAqTzFZnebQAH?= =?iso-8859-1?Q?RWLOMp0+3zjq9ky/Cg8cfsSRBQJ1uFhyTJHRhQSUgYjOICyHAx/ogc7pwm?= =?iso-8859-1?Q?Pk52FkFn8Ik45lrmIqTkkISO/Q8tehYPwK+XXtshY7PuRtHy/Qg7Q6kI+l?= =?iso-8859-1?Q?SeWziTk5CyuRnyY1g3i8cqkfttKi6zjgYqdWBXNQg3PtaKDBl5D5r83pfi?= =?iso-8859-1?Q?NAElVd5xRBErh7dneGVvfS/v6CWyWTVSA6LApfuuQwx898Ojw4WKBGmS5J?= =?iso-8859-1?Q?jdT20DMLDpLbNmKj0IrDiILnF+yNXK6si+fm1gZDsNoBUqt581RMmuXM8i?= =?iso-8859-1?Q?UAAsvdMYgkQWaMbRJtUtGAsOxPvFpUUn8peRTskdxp9IDbUR54bCuj5SAW?= =?iso-8859-1?Q?lgV/znbw8o2tP4SbOL6KQMhEl3CumKrn9l0rxkgMRmNm5uqJRyWDZTLAbO?= =?iso-8859-1?Q?1rUhGpgTLbPzeiEEdHCNfhRabp4AvcibV9gHlmigRWdbYDHx+naFTQGwBY?= =?iso-8859-1?Q?elDaM41cA8kQ4FwYb8967FwD3dYn2GyX9csnEV6Emz46CM?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5214.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 437425b4-a468-41cf-7dbb-08da262f2575 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2022 20:15:15.9497 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: j+PqDGAJGtqCt/15hWoSRwskmqLybVki6VbfkbV2f0INgrff9vq7yrtjJqLOGbxI X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1349 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 [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 Airli= e > ; Daniel Vetter ; Liu, Charlene > ; Lei, Jun ; Guo Zhengkui > ; Liu, Zhan ; Jos=E9 Exp=F3sito > ; 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