Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp254751rwb; Thu, 12 Jan 2023 06:01:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXsOVNC0ZxXpS2Lm94ch7qXknWsW0qZbkjUnXPtlY32jkUx4YrUNihHgkQI+iK2dPEMsRwBw X-Received: by 2002:a17:90b:1b06:b0:226:7e5a:fe05 with SMTP id nu6-20020a17090b1b0600b002267e5afe05mr36090668pjb.2.1673532117387; Thu, 12 Jan 2023 06:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673532117; cv=none; d=google.com; s=arc-20160816; b=d2417evVdv+thHDa/6piHuzzTx1M/oj9EEBMko9xW0McvHmcZPwD1P1B0nuRbTd+RY NEpAUsBoxrjgG8Dd+n7tx2LE/zjm5vtDit1KSiwdMJHVof6QJ38UGMnBD3kVS+7R8q4n 3KwmR7MC/Ia2E4974He3vLGKP975fxAsxzyUdiSxIUuiEHJZPLQvK/KrqojoiPISl5x0 NuL56mBmvJ3esMEJVsYrhNG7/MV0jq6BEXSBog7nFcBHRmxnkN9yrvlMdp5UN7Cyxa0a vhV2hNgoe6u4lGbu/q8z5zUJvM6NMPxFXCY9iqf4HDdoG3d0tRbw1hid6+TI7NWysxcr OdFQ== 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=gtb9TKEAuKf0ldh2jGkcqOTWKiJwaPptOwY1z0TBvl0=; b=xNsp9/DHz5+INLHRbKeoIsT9oyG0HpZNT/J/d20tf5KSaXa20Q2JoFu0LXKru/N7dt Jw45cYOJPaX+ItTqStRv+EnGe05a10GKv/AzQymRIrOPEciPsCFDJ8+35bLV90+b8OCP H+YmaZPretepi2mzfK6bv3mFqCEHWSfPCDuNErwSgZQwefBZKw/19IjMprDqVaCG8W1b tHMsDc9b502BQXct0NtFMCxjCW3QagMek5NP99+evXvSLo+QJThrFOgy97TajAUTic8j olI2vrnsYB+rNxSFBNiUVrpXAA3z7z3cbSbM4dv+IIOAJnyd1M0Kve2criqM44UZflp6 /zgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=hsLsYzmB; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a17090a118f00b002213d3227d1si19996603pja.169.2023.01.12.06.01.50; Thu, 12 Jan 2023 06:01:57 -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=hsLsYzmB; 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 S232651AbjALNwH (ORCPT + 51 others); Thu, 12 Jan 2023 08:52:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230394AbjALNvt (ORCPT ); Thu, 12 Jan 2023 08:51:49 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C870517F2 for ; Thu, 12 Jan 2023 05:51:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673531496; bh=ZAn7ZSvuny3A40ep6L1C3DqFhwPZfavNHTKFbfUsRxU=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=hsLsYzmBjETINLz1Ja9/z1RFZVcBYUbHn7a9lGQeWWxVIR2aOvEaCHM3hW/0vW3Wg 4uQveX+YjNjCQ7FeCzMA0owVm4zZaIibEUhv69J8B1+mduCsJuL/r6IvseMXRAIcLL UKBbH2XziNiSDioZE0ffoofCAATDAKel1aRhBse4= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Thu, 12 Jan 2023 14:51:36 +0100 (CET) X-EA-Auth: Jql7kLVBTRErAY5Y8kPmRih3iDlhh+Av3Q2tRc5pWKa4/h+rUuSd4pAfiyzp58G/Z7umku8+u+IV1WMtssm9vCSzWYHyaSk2 Date: Thu, 12 Jan 2023 19:21:30 +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 Subject: [PATCH] drm/amd/display: Conversion to bool not necessary Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 A logical evaluation already results in bool. There is no need for using a ternary operator based evaluation and bool conversion of the outcome. Issue identified using boolconv.cocci Coccinelle semantic patch. This was also reported by the Kernel Test Robot. Hence Fixes: 473683a03495 ("drm/amd/display: Create a file dedicated for CRTC") Reported-by: kernel test robot Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c index 22125daf9dcf..1e39d0939700 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c @@ -105,8 +105,7 @@ static void vblank_control_worker(struct work_struct *work) else if (dm->active_vblank_irq_count) dm->active_vblank_irq_count--; - dc_allow_idle_optimizations( - dm->dc, dm->active_vblank_irq_count == 0 ? true : false); + dc_allow_idle_optimizations(dm->dc, dm->active_vblank_irq_count == 0); DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0); -- 2.34.1