From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 476CCC433C1 for ; Mon, 29 Mar 2021 15:01:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0711860234 for ; Mon, 29 Mar 2021 15:01:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230226AbhC2PAc convert rfc822-to-8bit (ORCPT ); Mon, 29 Mar 2021 11:00:32 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:33369 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229842AbhC2PAP (ORCPT ); Mon, 29 Mar 2021 11:00:15 -0400 Received: from localhost (91-175-115-186.subs.proxad.net [91.175.115.186]) (Authenticated sender: gregory.clement@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id C8E37240018; Mon, 29 Mar 2021 15:00:12 +0000 (UTC) From: Gregory CLEMENT To: Pali =?utf-8?Q?Roh=C3=A1r?= , Andrew Lunn , Michael Turquette , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Marek =?utf-8?Q?Beh=C3=BAn?= , Miquel Raynal , Tomasz Maciej Nowak , Luka Perkov , Andre Heider , Vladimir Vid , Russell King , =?utf-8?Q?G=C3=A9rald?= Kerma , Konstantin Porotchkin Subject: Re: [PATCH mvebu v2 09/10] cpufreq: armada-37xx: Remove cur_frequency variable In-Reply-To: <20210114124032.12765-10-pali@kernel.org> References: <20210114124032.12765-1-pali@kernel.org> <20210114124032.12765-10-pali@kernel.org> Date: Mon, 29 Mar 2021 17:00:12 +0200 Message-ID: <87mtumdmyr.fsf@BL-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Pali Rohár writes: > Variable cur_frequency in armada37xx_cpufreq_driver_init() is unused. > > Signed-off-by: Pali Rohár Acked-by: Gregory CLEMENT Thanks, Gregory > --- > 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 f08281fc525c..f13646d143de 100644 > --- a/drivers/cpufreq/armada-37xx-cpufreq.c > +++ b/drivers/cpufreq/armada-37xx-cpufreq.c > @@ -389,7 +389,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; > @@ -450,14 +450,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); > -- > 2.20.1 > -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com