Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp868164rwb; Thu, 12 Jan 2023 13:29:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXuY7wEX+qfdxpCe6ulSmBq2LD1qqwBlO3yJh+XlkdVMf/nSOqzEujqfDW0IDG0pKhq65wZ0 X-Received: by 2002:a05:6a20:6682:b0:af:73c4:1c1f with SMTP id o2-20020a056a20668200b000af73c41c1fmr78055987pzh.42.1673558979944; Thu, 12 Jan 2023 13:29:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673558979; cv=none; d=google.com; s=arc-20160816; b=OMgm9EskSmh+NOUrXzdk4/3W5jdzVQrmsQR8TCDcsYig+WFxlHd/PXoZ1zMhpQxyV4 YtPEo4TlexQuQR1LlsWXvOLrIFQgEeowq6ER9bvHmiaK+JeLsZjLBc2pE7OUYXZV1bAg f7qakFP4Pk09BNeiy0ZzEKWwNE/+BLdDc5NJRQOZumWsyLCEDjSGjubYf2NHRIxR0xet OhUUylgbvvZraloCiAonvlQKvEXWPkUYKA0ho4EtCcztWNFmZeV84WXY6eKvX9VP+mBD HZta5qQ0OG0UGtT/Wx2PbIlrvAWBcZHlvRYmLtaszNmhcSN9o7dTlj7+nCY5JTKUS4HI sy5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=aypgsOMzmGEhnMGY/eHKs1+jahN6svk47TXr3cbBLDY=; b=RYutdK2bXXD/kOIZtdypu3Q3d4HF6bBdCKkbwqSayWeV/vC0ayv3f8gTGS+XAegisM YMoeR2E/ueRMvx8JFeGpx0NVnSvZuDBGnFjY006onfo2c4Av34YtDGcKTxl72rwCII/q 4G8DhneU9iR2U+xOmqXfK2i68l0+YFZgdgYSwtZOls9fg+3VAgcTmyCwAaFhlC27CegY TOLKjrxWWSTgqKXug0ismSqJ1uRZFAnyc9cC2DvFokbxfSwSSOJH/uku/Jp8hPJlGhmU OzzSXx9QUb5BDIRoRqD23cK+tCVZ3UJSFnl7DoIz3IpbF+YXT6Wmlap9OYuQsCo/1Zau J3lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XJIfIuVy; 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 h71-20020a63834a000000b0047c9e9084c8si6585243pge.855.2023.01.12.13.29.33; Thu, 12 Jan 2023 13:29:39 -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=pass header.i=@gmail.com header.s=20210112 header.b=XJIfIuVy; 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 S240014AbjALToI (ORCPT + 50 others); Thu, 12 Jan 2023 14:44:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231924AbjALTnr (ORCPT ); Thu, 12 Jan 2023 14:43:47 -0500 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F258F10073 for ; Thu, 12 Jan 2023 11:33:49 -0800 (PST) Received: by mail-oi1-x231.google.com with SMTP id h185so16113678oif.5 for ; Thu, 12 Jan 2023 11:33:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aypgsOMzmGEhnMGY/eHKs1+jahN6svk47TXr3cbBLDY=; b=XJIfIuVyF+2IeoN8v3sm8ShKWmRSQhjtD/VSFe40yy9oq/Bd/3BrFL/EiH/ND/xLtv AoSNUskM/kLb/ByQl4tqDJ1BZT0ulle6DoHja4hqpFL9LBn0efdGnj9Zcpq56jHrl0E1 Kz5tZ64Lcx2JRTrsUNQjkVSo6sYM95eqe0b1cpt/8qvFTUkN3GHYe63eOAVQWY/0b7rz 3nOpFcdKPJpHdAnTunPdlNZs4yMBAO+6uROA2EF/4GEbWv37fh3qA4L8h+GzuGMUG1gO O+d+3F+8CBODT/B6OMZH+5ZDWX0UMV4/W83OcrbQUG0DQVpZwPzqPKHjAjbyWyZxj/VS gayg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aypgsOMzmGEhnMGY/eHKs1+jahN6svk47TXr3cbBLDY=; b=EPZxdCYUluO+blnmah8FQ2RCFOLUVN283SSkEegOgYDKLWNvmRM/ZLE7AzsVe27SV/ AKD3wH4Ev8Hz+QHv3cdTYj1bTn1FzYO+vSCj2LtlIsZJwvgBN/e/MSN2LeRWa6e49lpn CpvWxAdJ8Ffb1lzgGzz33Li+JjVMAwEnHcyaOBvs4kLoqWoG+cdnLdVInKF+CUMJFD8R YPoitM01bJ0MwyWBszhVrnbQJ6vfiO3XiE/vtRg+4ca/uLnOA8SGqij2gnCI2zbg95Bb AssXwbX1c8f2cL7B5ytlz3Vq28nKd9097+Cqo4V9FV32CL1B6uDqOasc+f0r5O+ZxMtZ DJOg== X-Gm-Message-State: AFqh2kr9KON/yw49ogNlnwm+/5XgxvJwqW2rj43bcX5okA9EKtfx8IqA fm4knzgI62VJQ8Bb8Edx80AX69O3cTviKPPqR+k= X-Received: by 2002:a05:6808:2994:b0:35b:f5f7:3ed0 with SMTP id ex20-20020a056808299400b0035bf5f73ed0mr5306345oib.46.1673552029252; Thu, 12 Jan 2023 11:33:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alex Deucher Date: Thu, 12 Jan 2023 14:33:37 -0500 Message-ID: Subject: Re: [PATCH] drm/amd/display: Conversion to bool not necessary To: Deepak R Varma Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Praveen Kumar , Saurabh Singh Sengar Content-Type: text/plain; charset="UTF-8" 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 Thu, Jan 12, 2023 at 8:51 AM Deepak R Varma wrote: > > 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 > > >