From patchwork Sun Nov 6 14:41:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 16148 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1530126wru; Sun, 6 Nov 2022 06:53:12 -0800 (PST) X-Google-Smtp-Source: AMsMyM7SR3QwsNZE+1Tkr9hZ9bgtxbMN8rhhk0yYrAFLBPuqrxTp7uslvpi3s+YwNw+HZNsFn+ES X-Received: by 2002:a17:906:847b:b0:7a6:2ad9:298 with SMTP id hx27-20020a170906847b00b007a62ad90298mr42812355ejc.90.1667746392059; Sun, 06 Nov 2022 06:53:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667746392; cv=none; d=google.com; s=arc-20160816; b=hwO0eczQgzAJFQXkjV0pcgX9r3rx5t4avReDsYtSU8xmEJZ/jDIHI6YZAPxQA0Lbwb FRjHZzUzYW22Aeuv2sQz45KYApz/Uk7KArJe6bI4J9r6HMugrRbWtOJY490ehCPd33gy dn6wInxzwM+hZlPq5wWE5wl3feEw/pd/3r8VinFwBXSdlHdlQVxawjXPoRZpdm+LOjYf hWUM1G72rFvYDP6GumV0CNFQIsq/GBcWd15HunupApCgsew6XIO0cdJ3c+t/3Yy6PRJE Q0ber4ig60ctDRdl3opRR8PsKFPfpMmI6J8/4L/ew3PwdzLKC3mMM247v3S+LLkv+xYT KTbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=o0jKqNdz6bIwJzqEZ61DVpd8g/TYDmkjr36iueTyae0=; b=d1Pboi7BSwDhmt5SRVMxJqsS3C2K8BofKZVkTq24SsCKsGdZ+KhQ8SyZWSOylRrDH/ fIrv4JGUIC0L8uyMB2iQA/moMUYTj/+8XN/juVHqtvVdig87mRswyIfxrTz0uV2LQDqU Zy7yehQ1mSUP978I8ixPEc2aiCJa68t+381mfcMOfUX7meNpehJOnEs/3YW1yiKT49X9 VGuH40YK88ZTE15Vz2uyzE86/7gJwO4ldrpOcWDEjElqtaifU6W0aA4YMwpo2J+SismW U82kIVzutGfwYqFFUePkDiRdr7DCR+HXOJICoetVV0zqm+91yz75LdwkI7mlF8uScMIG TYdQ== ARC-Authentication-Results: i=1; mx.google.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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht20-20020a170907609400b007acc6769292si7206356ejc.365.2022.11.06.06.52.48; Sun, 06 Nov 2022 06:53:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230020AbiKFOq6 (ORCPT + 99 others); Sun, 6 Nov 2022 09:46:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbiKFOq4 (ORCPT ); Sun, 6 Nov 2022 09:46:56 -0500 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8650FDFCD for ; Sun, 6 Nov 2022 06:46:38 -0800 (PST) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Sun, 6 Nov 2022 22:41:50 +0800 (GMT+08:00) X-Originating-IP: [182.148.13.29] Date: Sun, 6 Nov 2022 22:41:50 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: wangkailong@jari.cn To: harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, HaoPing.Liu@amd.com, alex.hung@amd.com Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/display: Simplify bool conversion X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn MIME-Version: 1.0 Message-ID: <4fa201a6.bf.1844d6400c6.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwD3C+Kux2djlYsBAA--.54W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQACB2FEYx0CyAAFsQ X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** 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?1748758840635985691?= X-GMAIL-MSGID: =?utf-8?q?1748758840635985691?= Fix the following coccicheck warning: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c:109:52-57: WARNING: conversion to bool not needed here Signed-off-by: KaiLong Wang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3675b39e297a..bdac1ea12471 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 @@ -106,7 +106,7 @@ static void vblank_control_worker(struct work_struct *work) dm->active_vblank_irq_count--; dc_allow_idle_optimizations( - dm->dc, dm->active_vblank_irq_count == 0 ? true : false); + dm->dc, dm->active_vblank_irq_count != 0); DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);