From patchwork Tue Aug 23 07:14:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bernard Zhao X-Patchwork-Id: 12951788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71318C32774 for ; Tue, 23 Aug 2022 07:14:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B12BEAFD62; Tue, 23 Aug 2022 07:14:54 +0000 (UTC) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2138.outbound.protection.outlook.com [40.107.215.138]) by gabe.freedesktop.org (Postfix) with ESMTPS id F10B0AFD57; Tue, 23 Aug 2022 07:14:42 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iaXLr4EdMSA5WCeR9cvA1Vzv8QZyvS5eOUogUYKmbXVcSj99p8bNs1c5visfrB+dL/RpFcTMMyBpEHz+Zcwxx4b9GoKwz9mo/rEoyQtOySlKFc7IYrz/1cz0X+DphOCLOIs5WcC5i6kVWl/RxPqbSKDeFGHVcm1YcouBH6LEqqOWqjE3uMxVJkH9LDF6q1s87AkRmDpCrZiqszrLqSECZMZLMDbeyptecpfas8KFbQ+FNyNiOFbOxAMz8GZORmgbvvafh7d6EgNCmxVs1VSI3CSnnZ6jmPuS6OfNcEvTHJbcO/bUXFIm6/UNhqXgdXoN2H4+RCRAOKglSd94A9zmJQ== 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=jqTYgpmA2/CsH4qvbQpsKKPLYuXjR2N63sSOhaOzSZQ=; b=Rge48lKk9g5RBJ0VHgM1Ly9mrU8AWa9w/x7KwhKmbBWYJJjo+XFdmp6vW8hguSsPCyLoBhVB2lFjaJSWHK+eGajmVjgHQz5NVr4qY7ZWC49KNGzogpcvqUYl8LnNxbMpRgBc+LF6jCwaxXo+JpNDneGlHynMcY8/UmnpL05tG64mWES6PsA3pzj3GuybreYjTipsK1/8ARQaaEn9IEf2Vs70cGCBwZcsCq7oa9dMOAdj6/2OpumY36NqfALekZ8Z3UuSybQ5wbIV66EaCBsft6KdNiTqYNRNX3VmgzgqMhWm+aXjv9G1hSv/BJfEnBnO5iB5UrttDV/axmBYUR7LuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jqTYgpmA2/CsH4qvbQpsKKPLYuXjR2N63sSOhaOzSZQ=; b=CYuyQH8BPml7xHCYPA9hOI4GCByk1+PiW9PdEmGDczd/ODUMAl48diliAqSYPBGgZX2YNkFw10cPoZO8GwvEvnmAWerrW5jTFz1VHRnb4PwVd8TcdeMEtIyr3ReICVhgG4cTsAVoreJIyQrPImcipF2pZF39bKK5YuB96eEVvxU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from PSAPR06MB4021.apcprd06.prod.outlook.com (2603:1096:301:37::11) by PU1PR06MB2359.apcprd06.prod.outlook.com (2603:1096:803:3a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Tue, 23 Aug 2022 07:14:37 +0000 Received: from PSAPR06MB4021.apcprd06.prod.outlook.com ([fe80::5c66:2101:a7ac:8df0]) by PSAPR06MB4021.apcprd06.prod.outlook.com ([fe80::5c66:2101:a7ac:8df0%9]) with mapi id 15.20.5546.023; Tue, 23 Aug 2022 07:14:37 +0000 From: Bernard Zhao To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Aurabindo Pillai , Samson Tam , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] drm/amd: remove duplicated argument to && Date: Tue, 23 Aug 2022 00:14:22 -0700 Message-Id: <20220823071426.26015-1-bernard@vivo.com> X-Mailer: git-send-email 2.33.1 X-ClientProxiedBy: TYCP286CA0057.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b5::20) To PSAPR06MB4021.apcprd06.prod.outlook.com (2603:1096:301:37::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0775d4b0-fff3-4b72-e273-08da84d7232c X-MS-TrafficTypeDiagnostic: PU1PR06MB2359:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GJ64khzAPA6RXuI8dRHON/duMTeF21gfypPuDssEFsrDxz064yx/ceeWs0wbWlK+zLFQ78uidVeUUHUFzwRp6vwDDdNTlnsKQVxVnCOTVCc3Mob30EoYg1Fs1Xq6WKKISRwdM/9yArfTOi6mxdX/cfp7zyIQBEccQppp0vh+zf7IsEaxghFCsG2oSw4ZYyfG0bucTTnGHXMdVWdAgUmQTvkEGsknN9fEIgnSRGMdTIgKEs8Q/cKQJxM7AiCDiO/IZUzzxrdc3qKSrADUklEQH+Agfg0S1TBrd8Ef5221aMHW3i0Gr3m0lstZV8kW7d90U8TbYTFOl6iM32E9/QKuYp7hOYgsO2qfqvcy2wRQy4UzBcRn9vXDN80qQ0S04pGMesfq51jeXq/FSL4Ny7wgVUCvwM+3dwQzMIlRNvc1C9mxh30XFVJQPEfQZs1IWanQiczgAGhiJbbQWykY+DiEpBKoIpgDylB72wQuvQyjWRtNEZdGP0t/1ebuCPpOxHMRRzy8abh2FWonXGzbs+wKOoOFvGVGnXEzAR9hG2S8XQiXcBkuno9wgzhieZngryrGGUTLYwxamhEmvCd7fdJzz4/MXPy8m+OMia4tOYfWStT5nEc7Q3/z8QFM/Emjkn/rvDewg2j+WdsB/U0JyhYI43GYABhYLhDxG0QK9+JckBC4Qm3HyXtj/6Caeb/QsZf5sZuPn8uYXRq+xbKjbQdyUf7OuIjcGSt0uZ23QWpTjguCYxHfk1tvJ8+27HednJ/Z7JxgsvUVxdeWO32QQpMnMw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PSAPR06MB4021.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(396003)(39860400002)(366004)(346002)(376002)(136003)(110136005)(36756003)(921005)(186003)(1076003)(2616005)(38100700002)(38350700002)(86362001)(83380400001)(6486002)(316002)(4326008)(8676002)(41300700001)(66556008)(66476007)(66946007)(478600001)(7416002)(6512007)(2906002)(8936002)(52116002)(6666004)(6506007)(26005)(5660300002)(107886003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FFbVe/x+mkverdp6NqgLu4WtC936a2fZRLbLPU/NVZTgkdkyqKS2vC8uhqNdtV+CZs8Gh97Ncny/m4W9kIvlgU36ouPr8PR3o13UqixX84DQDYV2amGp+GCrHzPgkS4xc0xs1dRt7M2OGnTXjptRqMqd9Wjx/ei/BLiy7i8OEfdtwhlulgDqupC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2SZpLWcK0BtyK6wsHunBFia1+TJ1zeerztvFxHz50FuT5V3tPyjqqRi4OHTshDb1iM6MlSo1EdjfP/wevgNcTo+ayMUDbGsVL0IPWPXRLogX1Oxfbmpdji55iU/AdTm8PPW4eRIe2PZIS0yHtaWioJcu8jIZigZT2YJ1uk/muyEJCGkWyBqpVidoJ46EbyJ+9+QPhh+WeASGOs8JKA69kDvHeBTx/ZPfsvUEkne1w6k3tXf8lrIGQKGf8cSB2abPmL1aMa84cQsqQkimXg8PKbTIeSkH06Cx5ah3GFsEhOOd/W62CqRCHrN3LqSOp+vmBrlcPhLvXCRt3/ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0775d4b0-fff3-4b72-e273-08da84d7232c X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB4021.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2022 07:14:37.1669 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yzf5GkOVhiXIVwRJFF29JRA1FL/DJaH7sB0W8GXn8rB7R0LTcYqdHf13TvVxD/Cl8zJXzzqtrFrUCuPIHKsCZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1PR06MB2359 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bernard Zhao , zhaojunkui2008@126.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch trf to fis cocci warning: drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c: 2349:8-34: duplicated argument to && or || drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c: 3680:8-55: duplicated argument to && or || Signed-off-by: Bernard Zhao Reviewed-by: MaĆ­ra Canal --- .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c index cb2025771646..f99c1696a1f6 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c @@ -2346,8 +2346,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0) mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true; - if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k]) - && mode_lib->vba.OutputFormat[k] == dm_n422 + if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422 && !mode_lib->vba.DSC422NativeSupport) mode_lib->vba.DSC422NativeNotSupported = true; @@ -3678,7 +3677,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64 && mode_lib->vba.SourcePixelFormat[k] != dm_444_32 && mode_lib->vba.SourcePixelFormat[k] != dm_444_16 - && mode_lib->vba.SourcePixelFormat[k] != dm_444_16 && mode_lib->vba.SourcePixelFormat[k] != dm_444_8 && mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) { if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]