From patchwork Thu Apr 8 11:42:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12190775 X-Patchwork-Delegate: viresh.linux@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CC4FC43460 for ; Thu, 8 Apr 2021 11:43:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28D0861155 for ; Thu, 8 Apr 2021 11:43:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbhDHLnz (ORCPT ); Thu, 8 Apr 2021 07:43:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:40086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231192AbhDHLnx (ORCPT ); Thu, 8 Apr 2021 07:43:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C2D736112F; Thu, 8 Apr 2021 11:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617882221; bh=+4psGGWw3ZVh4ekY8H4nHgj/unzB+zQ0VmpJVSLylRc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SI+Dt71Cw/R47fzrFaik8V/+kny9t+rjWLlbMptY+Ic0CC17ekLrrt3u3hX/HreTs DVF9DRMEyLdhiXWfoSTuNVs6HC1cFTfhxxHA/MfTYzdV5/B+GJEqUiL3nZogB7FSmp RbPXTLZFZgTsmFNcEnYwcs+pCJhlV58I8d45A8NYd6qAhIAe9Kgjm2KaZlsSpkdKhX UDoo6W2ZHA3hlv358VZriwdFEQ+CiixKjNl4PErIiYOmQ1jc3w0aUAM+llyB9QyRco V6N2bRxdv8inODpYgg/sXABhnWjlPyQl1wzjCDpj4cjnoG3tzuDiJddj6gtWkEMzmz HTYqj1zOuGvzg== Received: by pali.im (Postfix) id 1F262EDE; Thu, 8 Apr 2021 13:43:40 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: linux-pm@vger.kernel.org, Viresh Kumar Subject: [RESEND PATCH mvebu v3 09/10] cpufreq: armada-37xx: Remove cur_frequency variable Date: Thu, 8 Apr 2021 13:42:22 +0200 Message-Id: <20210408114223.8471-9-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210408114223.8471-1-pali@kernel.org> References: <20210408114223.8471-1-pali@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Variable cur_frequency in armada37xx_cpufreq_driver_init() is unused. Signed-off-by: Pali Rohár Acked-by: Gregory CLEMENT Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares --- drivers/cpufreq/armada-37xx-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c index e4782f562e7a..050abff18308 100644 --- a/drivers/cpufreq/armada-37xx-cpufreq.c +++ b/drivers/cpufreq/armada-37xx-cpufreq.c @@ -400,7 +400,7 @@ static int __init armada37xx_cpufreq_driver_init(void) struct armada_37xx_dvfs *dvfs; struct platform_device *pdev; unsigned long freq; - unsigned int cur_frequency, base_frequency; + unsigned int base_frequency; struct regmap *nb_clk_base, *nb_pm_base, *avs_base; struct device *cpu_dev; int load_lvl, ret; @@ -461,14 +461,6 @@ static int __init armada37xx_cpufreq_driver_init(void) return -EINVAL; } - /* Get nominal (current) CPU frequency */ - cur_frequency = clk_get_rate(clk); - if (!cur_frequency) { - dev_err(cpu_dev, "Failed to get clock rate for CPU\n"); - clk_put(clk); - return -EINVAL; - } - dvfs = armada_37xx_cpu_freq_info_get(base_frequency); if (!dvfs) { clk_put(clk);