From patchwork Fri Feb 10 10:00:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 55359 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp865182wrn; Fri, 10 Feb 2023 02:06:49 -0800 (PST) X-Google-Smtp-Source: AK7set8IITmvcQ+aDzlxgzpyKtgLbvvdvJvFOCiwVvfZIqko00HjT450kJHqc+b+OZaC61Co2tdy X-Received: by 2002:a17:902:d0c9:b0:19a:5a2b:42cc with SMTP id n9-20020a170902d0c900b0019a5a2b42ccmr4485462pln.59.1676023608962; Fri, 10 Feb 2023 02:06:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676023608; cv=none; d=google.com; s=arc-20160816; b=hpzvy09CxCqOOSxUTLutQH2uJgGVxB7y3ziBkpixDiOPuWcQG5fR+mJGgcdIx7w767 7I2KdY1NEbALLlNJsmvDeBhCRARI0HYqQXP1O7ltIYRGFklnVODaZyOSVwF9TpmM4aTE I6TfLAl02xiRsfHXjxahICnZG4ftYxORuB3MEBLQNL/u3YAHiAhBePjNmeD9cApwccC+ u7tFCKczdwsD8FBZEUj3y0p1UQDLqlEKsDI59tRfCADmXcG6OnALvPramb9P046u4ovi WR/s6s3fBqChk39dSeORzsHC3fGk5RkkKJtnWIBvn4ZHjO/ErWGt0SUDW/7MJy1H8laO mBUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=WxJaa66EHKF/PEJRfV8pZfH+mIlhv3zlDz3VcgMqwp8=; b=Ve1RhVBmFbuR2Qr2GB1JZ19TWyRt5AKE4bZ6CFi4foQ6HQaA6Je10s1tkDF9CdgSsh 88ac1xXePwSPcOxIlJBMcQ+ozmd5k/Iag7ZERRCnCloN7NbSl1RYPtGgWBYQfL0SEclR HlXBYsK25sktNNqxjqb45OpgXRC+bzvpjtKaeVfR4+ka+tDdfGrzaHr6NMTetoZiF33K ohlVG+og2FfmtSyP6taXdwfZl9rjBBfI/nOE4szgqPwdm3Kc30bKnp8GPhsxs5qnXODR anEek+sGWyWI9HE2VyAAdiShwYB0q2x+ISWH+QgBXxk85o9zHWfMQ6S03T1gXG4Bn98F k2oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=dLN2v0lJ; 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=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a170902e54200b0019673232329si4895310plf.616.2023.02.10.02.06.35; Fri, 10 Feb 2023 02:06:48 -0800 (PST) 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=fail header.i=@mailo.com header.s=mailo header.b=dLN2v0lJ; 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=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231949AbjBJKBZ (ORCPT + 99 others); Fri, 10 Feb 2023 05:01:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231481AbjBJKBV (ORCPT ); Fri, 10 Feb 2023 05:01:21 -0500 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5454E7B145 for ; Fri, 10 Feb 2023 02:01:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1676023251; bh=OSyoTpdJIQ68wdvoa27f76+Ft7Eat4Qqrj2ni75ZjlY=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=dLN2v0lJNO/R9XxljsTYyDGzEDcp46LY7SNLllVfNCzD59qU1Xfh2AAjjb77EzHlD 0iCewyeMeYqIgOf9b9gL22kOyJnhRoj1jaIRP20lGA/uckiiTteo1Y2WYCAzHKM14E 86VlK2KInkvDzlH/OUhk76ITv+OKG7NbznBa4rmI= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Fri, 10 Feb 2023 11:00:51 +0100 (CET) X-EA-Auth: Nf6tPsEPxv5OhlOXiVf8OdDvgK+wSKjuCHgTMdsYfS0p/LNkCjDFiz1fDavnjR+SPdxr0xlQkEZmnQxvn4NhObJwXjiOC9io Date: Fri, 10 Feb 2023 15:30:43 +0530 From: Deepak R Varma To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , Christian =?iso-8859-1?q?K=F6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar , Deepak R Varma Subject: [PATCH] drm/amd/display: Remove duplicate/repeating expressions Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757438131683613231?= X-GMAIL-MSGID: =?utf-8?q?1757438131683613231?= Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using doubletest.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma Reviewed-by: Harry Wentland --- .../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 4b8f5fa0f0ad..ae89760d887d 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 @@ -2335,8 +2335,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; @@ -3639,7 +3638,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]