Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp91329pxu; Wed, 14 Oct 2020 21:23:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWPzybMLdsM3dw1iohNdx40siBX9ZR56vZo1Jj9oS2tkiFwESLRiH5Mz0oUxYN9b8lI6uO X-Received: by 2002:a17:907:270f:: with SMTP id w15mr2350428ejk.505.1602735783435; Wed, 14 Oct 2020 21:23:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602735783; cv=none; d=google.com; s=arc-20160816; b=vT9ewJSL/QrJhxTZwM/USHzQNKCmbDDf4gRcseIyRjS6pRya+ljiaTUt7fWNVgsuJl qEGVOsqTctJFKyFT00el8y+YG7Q+XmdUu99x1jZC0g2uXt6N3nm2TbcHz4hV/Y6wJiNO C2D/26cgoFkBj2KnT0bOCAxFlwDMujQnZJzSEGy93QOSOQvunQVQRAyDBe5oOQwaKoce fQndUOJligtbmGJpCnFRmpvbH1H+C+RVQ+Y+/KNwULd9YISwtODsZRIyfm5IV42Yf2Po Km00SIZ6OjZvXlD9UyADYaJalqIicutBDdsiFDEx4lLAqLZvde81b6VFNk+e1lEURUJF 3kCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jMTpMrf+1DwzWyva2r2vaTPDtAdHsKK4ckOqmBgBFdI=; b=kg97UR38VSul9k/L2skpcqoABXu0EoJJ6FnAQDibj73/mjM11No9D6PH0tmJwcaotm 0e+KO6bH9v0JsYcqAp8ijXxUw0JS0Yns3GrJwssu5TRefX2Os7KHXi1dJ6hAG532UER6 TtfL613RKhJuBQM4xRTcQ1i8pWSJgbox3VfQ5ePpMg/JloRZtczV09yjtpnLg6HpY262 Ohw2oRawNs5zRoWdf1REybhzhJQjsIToD9u1DGMj3ujat6/WE5D590Dv3yfbTyMCvU+L ElCJ37vJ5MSvY0k8N4WkBoYEBG8p/wP43npOHRjS58d2y7nb7RnxcjrS8OJJ20T17q5R I8kw== 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 x5si1100641edr.413.2020.10.14.21.22.41; Wed, 14 Oct 2020 21:23:03 -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 S1729172AbgJOCmt (ORCPT + 99 others); Wed, 14 Oct 2020 22:42:49 -0400 Received: from mail-m17613.qiye.163.com ([59.111.176.13]:43873 "EHLO mail-m17613.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbgJOCmt (ORCPT ); Wed, 14 Oct 2020 22:42:49 -0400 Received: from ubuntu.localdomain (unknown [157.0.31.124]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id 6E7D648299B; Thu, 15 Oct 2020 10:42:46 +0800 (CST) From: Bernard Zhao To: Evan Quan , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , Kenneth Feng , Qiu Wenbo , YueHaibing , Chen Wandun , yu kuai , Bernard Zhao , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com Subject: [PATCH] drm/amd: remove unnecessary conversion from bool value to bool Date: Wed, 14 Oct 2020 19:42:30 -0700 Message-Id: <20201015024237.25998-1-bernard@vivo.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZGUxCT0pDSk9OTB5OVkpNS0lMSUJMTU1MT0NVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS09ISFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6My46Ezo6DD8eDT5LTS0RMA1J EykwCzhVSlVKTUtJTElCTE1MSkxDVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlKTkxV S1VISlVKSU9ZV1kIAVlBSEpDSzcG X-HM-Tid: 0a752a236f1e93bakuws6e7d648299b Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In functions vegam_is_dpm_running & vegam_populate_avfs_parameters, maybe there is no need to conver bool condition to bool variable or bool return value. This change is to make the code a bit more readable. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c index 0ecc18b55ffb..32ca472f58a6 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c @@ -296,8 +296,9 @@ static int vegam_process_firmware_header(struct pp_hwmgr *hwmgr) static bool vegam_is_dpm_running(struct pp_hwmgr *hwmgr) { return (1 == PHM_READ_INDIRECT_FIELD(hwmgr->device, - CGS_IND_REG__SMC, FEATURE_STATUS, VOLTAGE_CONTROLLER_ON)) - ? true : false; + CGS_IND_REG__SMC, + FEATURE_STATUS, + VOLTAGE_CONTROLLER_ON)); } static uint32_t vegam_get_mac_definition(uint32_t value) @@ -1661,7 +1662,7 @@ static int vegam_populate_avfs_parameters(struct pp_hwmgr *hwmgr) (avfs_params.ucEnableGB_FUSE_TABLE_CKSON << AVFSGB0_Vdroop_Enable_SHIFT) | (avfs_params.ucEnableGB_FUSE_TABLE_CKSOFF << AVFSGB1_Vdroop_Enable_SHIFT); data->apply_avfs_cks_off_voltage = - (avfs_params.ucEnableApplyAVFS_CKS_OFF_Voltage == 1) ? true : false; + (avfs_params.ucEnableApplyAVFS_CKS_OFF_Voltage == 1); } return result; } -- 2.28.0