Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1270128pxb; Thu, 4 Mar 2021 07:27:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnGulPK4i3g0KACKtboQ0k9z8A8SrP5Np0aCCxLAMmKvyI2h6+SSrzhpyJR0c8SZyaQ8Ec X-Received: by 2002:a17:906:b316:: with SMTP id n22mr4615885ejz.249.1614871646679; Thu, 04 Mar 2021 07:27:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614871646; cv=none; d=google.com; s=arc-20160816; b=UIsb7ZYSDUUkZMe0jU9K/VYbGC8C2HdhJYGgBRM9FGiMWCWb539Zkt3hbeK+gy05pR /H5B/klIfmOhgLe0lWGL62mkuGL6OfizYGTLkIdWts+IDFvrifmVK819+UPCl7KgLwzs VmBVIJsZlDwAAGXzEaaXYa4yGzlbwINgXiB1rk5v6Y9IT0zvCUve5LnzX3qJgqjNn1xF DrR1wTcYD5+Fm+8thkXxgSsZ/1hsY5unF7EHRgUnBd4Sll+WjuxSIf8MdIAKb5s/Sxdi OOnApQCpZ1oXxsaP6gKlwf2tweyvmSMRJ8dWawxvn98g1Cyei7JV1c47u+R+bts/vPoP HVQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=duqQ9nAF/xPm7AR+3QX0uiih8BEkIKQFl1ckyhQ6lrE=; b=TRWJYEBfKhQQm9Z3tW91qXpSxfqg5uHLa2xc058Dbjq+Na+WB4km1pCoY5TYH/UOlE 3RrIjr7rf2HEdRngiP6hntdVamfsChsXpefsp4tZeOn+jZYi0/2ZheSqCbFLqAymxY0X e5Tr6ZUjkenKAMLknGPPoRRxtfR4d5y4NufuzSrHgvBHvvKnnj2mYe6ZQ76U2wZocMEe INzX3tlsQJ33fw9S4SXJzV6DurUZ0/H03hmZPBxcCAq3TyxMJDA2/ln+56njo4hP6LYW hjqHYXhzEM/HhdgvbkYKtgz370ijqy4p+hGucLkFRDBLOJDsvfgVJWdbyRbKNd+eWMwc JmdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si17140619ejg.99.2021.03.04.07.27.03; Thu, 04 Mar 2021 07:27:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235132AbhCDICi (ORCPT + 99 others); Thu, 4 Mar 2021 03:02:38 -0500 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:47332 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235262AbhCDIC3 (ORCPT ); Thu, 4 Mar 2021 03:02:29 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R631e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0UQLuUOk_1614844898; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UQLuUOk_1614844898) by smtp.aliyun-inc.com(127.0.0.1); Thu, 04 Mar 2021 16:01:46 +0800 From: Jiapeng Chong To: harry.wentland@amd.com Cc: sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] drm/amdgpu/display: Remove unnecessary conversion to bool Date: Thu, 4 Mar 2021 16:01:35 +0800 Message-Id: <1614844895-85184-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:956:52-57: WARNING: conversion to bool not needed here. ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8311:16-21: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 3e1fd1e..0e6b7415 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -953,7 +953,7 @@ static void event_mall_stutter(struct work_struct *work) dc_allow_idle_optimizations( - dm->dc, dm->active_vblank_irq_count == 0 ? true : false); + dm->dc, dm->active_vblank_irq_count == 0); DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0); @@ -8307,8 +8307,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) hdcp_update_display( adev->dm.hdcp_workqueue, aconnector->dc_link->link_index, aconnector, new_con_state->hdcp_content_type, - new_con_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED ? true - : false); + new_con_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED); } #endif -- 1.8.3.1