From patchwork Wed Mar 15 16:20:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 9626877 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D09A060522 for ; Thu, 16 Mar 2017 01:06:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE1FB2850E for ; Thu, 16 Mar 2017 01:06:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B302428610; Thu, 16 Mar 2017 01:06:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5F3A12850E for ; Thu, 16 Mar 2017 01:06:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 686DC6E311; Thu, 16 Mar 2017 01:06:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 12275 seconds by postgrey-1.35 at gabe; Wed, 15 Mar 2017 19:45:04 UTC Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by gabe.freedesktop.org (Postfix) with ESMTPS id 457416E0EE for ; Wed, 15 Mar 2017 19:45:04 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v2FGKP1Q025256; Wed, 15 Mar 2017 11:20:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1489594825; bh=prabt66Kf4Sd8wvDIgFXQoQSNsDDOkD+ejncdd54FM8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=mGZNZgPBiDl4qwy/J50NH9mZ0eZ9jXc3JvaNpyATjZtyvPr46Dql5ZbNKgr5FCwoM crDsdQrx9MqPDG8xuMRompKZrOQ/Mo7jPZje6UffWHQows8FI+SgU2PLHIiU2NBRJD Ambk9ZXX3Wa5fE1hIfHuSnyp8MQoc7zK/u1vxxt4= Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2FGKPAQ018563; Wed, 15 Mar 2017 11:20:25 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Wed, 15 Mar 2017 11:20:24 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2FGKONE010878; Wed, 15 Mar 2017 11:20:24 -0500 Received: from localhost (uda0226330.am.dhcp.ti.com [128.247.83.136]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v2FGKO317281; Wed, 15 Mar 2017 11:20:24 -0500 (CDT) From: "Andrew F. Davis" To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie Subject: [PATCH v2 2/2] drm/amd/powerplay: remove unneeded conversions to bool Date: Wed, 15 Mar 2017 11:20:24 -0500 Message-ID: <20170315162024.11906-2-afd@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170315162024.11906-1-afd@ti.com> References: <20170315162024.11906-1-afd@ti.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 16 Mar 2017 01:06:16 +0000 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Andrew F . Davis" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis Reviewed-by: Christian König --- Changes from v1: - Rebased on v4.11-rc1 - Added Reviewed-by drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 429f18b99323..1d27bd22e0c1 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -239,7 +239,7 @@ static int pp_set_powergating_state(void *handle, /* Enable/disable GFX per cu powergating through SMU */ return hwmgr->hwmgr_func->enable_per_cu_power_gating(hwmgr, - state == AMD_PG_STATE_GATE ? true : false); + state == AMD_PG_STATE_GATE); } static int pp_suspend(void *handle) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index 0eb8e886bf35..a317a832a33a 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c @@ -113,7 +113,7 @@ int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr) NULL, NULL); } - enabled = ret == 0 ? true : false; + enabled = ret == 0; cgs_notify_dpm_enabled(hwmgr->device, enabled);