From patchwork Tue Nov 21 19:40:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10068831 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 95E7F6038F for ; Tue, 21 Nov 2017 19:41:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F0652997B for ; Tue, 21 Nov 2017 19:41:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 740AE2997D; Tue, 21 Nov 2017 19:41:12 +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 433C52997B for ; Tue, 21 Nov 2017 19:41:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BA926E5A6; Tue, 21 Nov 2017 19:41:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3CB6E89C1F; Tue, 21 Nov 2017 19:41:04 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2549F607F5; Tue, 21 Nov 2017 19:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511293264; bh=iddM4ZL/6S4p6k1Cw17lzasI6Njgd9X16UZ6xnlXk7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sl2gRCrOVCC4N6WjkZjTBqFLQ5wZvHprBG/g6Sm2mD7iEKUActr/wwFlEru30Gldw cS7AEQGijJO5fqXTs2h0ynthhl/P3Yh6n503O/Eu9WZfUFIIqS3DMQlf8UkqJpBnm0 o4fBa7zt8RovbTnpDy3SUBlT/HuBwFpE0V3E86Bo= Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8B0AD606F8; Tue, 21 Nov 2017 19:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511293263; bh=iddM4ZL/6S4p6k1Cw17lzasI6Njgd9X16UZ6xnlXk7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FhG938tOR0ytcdlT2DJydzei7xoRJBI2R+pGczvtTP5KNqhHeZx1SpNMw8JUwRXG0 otOZGAnOQjKDTaZcb12Tg85QNLg3eNd0L0JeYr7INWBcBD2b3WRsXxFHu/TzkDE4ZV OqIgGTz/9VcCFxz+aPU9VsCBDCPci3EJPqiP8cSQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8B0AD606F8 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [PATCH 2/8] drm/msm/adreno: Remove a useless call to dev_pm_opp_get_freq() Date: Tue, 21 Nov 2017 12:40:52 -0700 Message-Id: <1511293258-12415-3-git-send-email-jcrouse@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1511293258-12415-1-git-send-email-jcrouse@codeaurora.org> References: <1511293258-12415-1-git-send-email-jcrouse@codeaurora.org> Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Calling dev_pm_opp_find_freq_floor() returns the matched frequency in 'freq'. We don't need to call dev_pm_opp_get_freq() again to get the frequency value. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index e1eb7e1..e85a1cc 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -240,7 +240,7 @@ static int adreno_get_pwrlevels(struct device *dev, /* Find the fastest defined rate */ opp = dev_pm_opp_find_freq_floor(dev, &freq); if (!IS_ERR(opp)) { - config->fast_rate = dev_pm_opp_get_freq(opp); + config->fast_rate = freq; dev_pm_opp_put(opp); }