Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1716109ybz; Sun, 26 Apr 2020 02:43:08 -0700 (PDT) X-Google-Smtp-Source: APiQypIiKyn1gd78OobfmoyEeJeMhKN9SvWjgEWoRD75DDwM0vGU5izU9HVbm/46r/v3mTD4Wr10 X-Received: by 2002:a50:f288:: with SMTP id f8mr14610840edm.337.1587894188837; Sun, 26 Apr 2020 02:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587894188; cv=none; d=google.com; s=arc-20160816; b=TRMxrE+m54HlKE8rSzCJ3dgoStPIbP72c+dmFlX7bSZ472DLMyvkQMrfRSI/hQWDqB AwtGScRf1EBx633Sl8BcDTAqhno6f8T2QDhpZvfUWnBsmdVTJ5hMb4dlEnoAMXVqa4fF 8U6yECnziyvy2Xaw+4xVPr4ARLyidPrkzYa6R1q7rNELMuN2udp/8H+8ToWBCPwilqlF KxFpeqa7rFSV22mPTe/otVJyLEae0Nu+sCflq55uAccOch76+DtHksvZgCHRlgCUcDwq yOUzgroHyUSH3fIyey58aqR7aP1YqmmbeN1ivhPfl06bRzRtAMCfBr2ZW7KLM0UFBhAe 4ahQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ii7qyDl9mcHTcGv7j80MQOdWb2RuXS3blurlvak1SDk=; b=YsMdYDH8OqlPAW2GMGHSUKgTJjwUec2xxrcRY3KsPqE9dgBhRhaCZZRvQ+htrtcAhC v+cqdQDvz7fE2dywePg0nf4FWt3Hz01/9U5nQ41AjYI0AGZym5Pd5uVYRWfznvzuxk7n bwUaTeLE0LHvI7S3+6okMn+GyaQV4WQZL90pVmXZ91utcxwR9mhcZDQeJNW6MNqiIoVT dg058PoBMsJUMKsxGenzksEK5c6WkFJgjxGJT62iB18l9jpBXjKHI8IA8X5VHciw6R3Q J+C3KNHrGXp6rPqElzBrMoRarmSAcFQCwp4y/fI7yEEXQyq3ejBXj+hDjq8j7UUdCsI1 jkhg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c22si6664853eja.230.2020.04.26.02.42.45; Sun, 26 Apr 2020 02:43:08 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726312AbgDZJko (ORCPT + 99 others); Sun, 26 Apr 2020 05:40:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3301 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726117AbgDZJko (ORCPT ); Sun, 26 Apr 2020 05:40:44 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8E6F3CA1E8DB84816E46; Sun, 26 Apr 2020 17:40:40 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Sun, 26 Apr 2020 17:40:31 +0800 From: Jason Yan To: , , , , , , , , , CC: Jason Yan Subject: [PATCH] drm/amd/powerplay: remove conversion to bool in navi10_ppt.c Date: Sun, 26 Apr 2020 17:39:58 +0800 Message-ID: <20200426093958.22875-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The '==' expression itself is bool, no need to convert it to bool again. This fixes the following coccicheck warning: drivers/gpu/drm/amd/powerplay/navi10_ppt.c:698:47-52: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index 2184d247a9f7..135442c36273 100644 --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -695,7 +695,7 @@ static bool navi10_is_support_fine_grained_dpm(struct smu_context *smu, enum smu dpm_desc = &pptable->DpmDescriptor[clk_index]; /* 0 - Fine grained DPM, 1 - Discrete DPM */ - return dpm_desc->SnapToDiscrete == 0 ? true : false; + return dpm_desc->SnapToDiscrete == 0; } static inline bool navi10_od_feature_is_supported(struct smu_11_0_overdrive_table *od_table, enum SMU_11_0_ODFEATURE_CAP cap) -- 2.21.1