diff mbox series

[3/5] memory: tegra210-emc: Simplify usage of clk_rate_exclusive_get()

Message ID 1b4321a975ac1a903a0c816ef2cce80e7d75eae3.1702400947.git.u.kleine-koenig@pengutronix.de
State Handled Elsewhere
Headers show
Series clk: Make clk_rate_exclusive_get() return void | expand

Commit Message

Uwe Kleine-König Dec. 12, 2023, 5:26 p.m. UTC
clk_rate_exclusive_get() returns 0 unconditionally. So remove error
handling. This prepares making clk_rate_exclusive_get() return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/memory/tegra/tegra210-emc-core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Krzysztof Kozlowski Dec. 13, 2023, 6:11 a.m. UTC | #1
On 12/12/2023 18:26, Uwe Kleine-König wrote:
> clk_rate_exclusive_get() returns 0 unconditionally. So remove error
> handling. This prepares making clk_rate_exclusive_get() return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
kernel test robot Dec. 15, 2023, 12:50 p.m. UTC | #2
Hi Uwe,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bbd220ce4e29ed55ab079007cff0b550895258eb]

url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/PM-devfreq-sun8i-a33-mbus-Simplify-usage-of-clk_rate_exclusive_get/20231213-012823
base:   bbd220ce4e29ed55ab079007cff0b550895258eb
patch link:    https://lore.kernel.org/r/1b4321a975ac1a903a0c816ef2cce80e7d75eae3.1702400947.git.u.kleine-koenig%40pengutronix.de
patch subject: [PATCH 3/5] memory: tegra210-emc: Simplify usage of clk_rate_exclusive_get()
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20231215/202312152014.NrQUsmxR-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312152014.NrQUsmxR-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312152014.NrQUsmxR-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/memory/tegra/tegra210-emc-core.c: In function 'tegra210_emc_suspend':
>> drivers/memory/tegra/tegra210-emc-core.c:2002:13: warning: unused variable 'err' [-Wunused-variable]
    2002 |         int err;
         |             ^~~


vim +/err +2002 drivers/memory/tegra/tegra210-emc-core.c

10de21148f7d28 Joseph Lo        2019-05-29  1998  
10de21148f7d28 Joseph Lo        2019-05-29  1999  static int __maybe_unused tegra210_emc_suspend(struct device *dev)
10de21148f7d28 Joseph Lo        2019-05-29  2000  {
10de21148f7d28 Joseph Lo        2019-05-29  2001  	struct tegra210_emc *emc = dev_get_drvdata(dev);
10de21148f7d28 Joseph Lo        2019-05-29 @2002  	int err;
10de21148f7d28 Joseph Lo        2019-05-29  2003  
53a616302fe1b2 Uwe Kleine-König 2023-12-12  2004  	clk_rate_exclusive_get(emc->clk);
10de21148f7d28 Joseph Lo        2019-05-29  2005  
10de21148f7d28 Joseph Lo        2019-05-29  2006  	emc->resume_rate = clk_get_rate(emc->clk);
10de21148f7d28 Joseph Lo        2019-05-29  2007  
10de21148f7d28 Joseph Lo        2019-05-29  2008  	clk_set_rate(emc->clk, 204000000);
10de21148f7d28 Joseph Lo        2019-05-29  2009  	tegra210_clk_emc_detach(emc->clk);
10de21148f7d28 Joseph Lo        2019-05-29  2010  
10de21148f7d28 Joseph Lo        2019-05-29  2011  	dev_dbg(dev, "suspending at %lu Hz\n", clk_get_rate(emc->clk));
10de21148f7d28 Joseph Lo        2019-05-29  2012  
10de21148f7d28 Joseph Lo        2019-05-29  2013  	return 0;
10de21148f7d28 Joseph Lo        2019-05-29  2014  }
10de21148f7d28 Joseph Lo        2019-05-29  2015
diff mbox series

Patch

diff --git a/drivers/memory/tegra/tegra210-emc-core.c b/drivers/memory/tegra/tegra210-emc-core.c
index 3300bde47c13..957bcaadb24f 100644
--- a/drivers/memory/tegra/tegra210-emc-core.c
+++ b/drivers/memory/tegra/tegra210-emc-core.c
@@ -2001,11 +2001,7 @@  static int __maybe_unused tegra210_emc_suspend(struct device *dev)
 	struct tegra210_emc *emc = dev_get_drvdata(dev);
 	int err;
 
-	err = clk_rate_exclusive_get(emc->clk);
-	if (err < 0) {
-		dev_err(emc->dev, "failed to acquire clock: %d\n", err);
-		return err;
-	}
+	clk_rate_exclusive_get(emc->clk);
 
 	emc->resume_rate = clk_get_rate(emc->clk);