Message ID | 9cf2553c9da167ebf6654bbdeab6ce2a93232ca6.1702400947.git.u.kleine-koenig@pengutronix.de (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | clk: Make clk_rate_exclusive_get() return void | expand |
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
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/9cf2553c9da167ebf6654bbdeab6ce2a93232ca6.1702400947.git.u.kleine-koenig%40pengutronix.de
patch subject: [PATCH 4/5] memory: tegra30-emc: Simplify usage of clk_rate_exclusive_get()
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20231215/202312152223.5QHKKu32-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/202312152223.5QHKKu32-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/202312152223.5QHKKu32-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/memory/tegra/tegra30-emc.c: In function 'tegra_emc_suspend':
>> drivers/memory/tegra/tegra30-emc.c:1696:13: warning: unused variable 'err' [-Wunused-variable]
1696 | int err;
| ^~~
vim +/err +1696 drivers/memory/tegra/tegra30-emc.c
e34212c75a6899 Dmitry Osipenko 2019-08-12 1692
e34212c75a6899 Dmitry Osipenko 2019-08-12 1693 static int tegra_emc_suspend(struct device *dev)
e34212c75a6899 Dmitry Osipenko 2019-08-12 1694 {
e34212c75a6899 Dmitry Osipenko 2019-08-12 1695 struct tegra_emc *emc = dev_get_drvdata(dev);
51bb73f93410a3 Dmitry Osipenko 2019-12-20 @1696 int err;
e34212c75a6899 Dmitry Osipenko 2019-08-12 1697
51bb73f93410a3 Dmitry Osipenko 2019-12-20 1698 /* take exclusive control over the clock's rate */
2ba3f947597dae Uwe Kleine-König 2023-12-12 1699 clk_rate_exclusive_get(emc->clk);
51bb73f93410a3 Dmitry Osipenko 2019-12-20 1700
51bb73f93410a3 Dmitry Osipenko 2019-12-20 1701 /* suspending in a bad state will hang machine */
51bb73f93410a3 Dmitry Osipenko 2019-12-20 1702 if (WARN(emc->bad_state, "hardware in a bad state\n"))
e34212c75a6899 Dmitry Osipenko 2019-08-12 1703 return -EINVAL;
e34212c75a6899 Dmitry Osipenko 2019-08-12 1704
e34212c75a6899 Dmitry Osipenko 2019-08-12 1705 emc->bad_state = true;
e34212c75a6899 Dmitry Osipenko 2019-08-12 1706
e34212c75a6899 Dmitry Osipenko 2019-08-12 1707 return 0;
e34212c75a6899 Dmitry Osipenko 2019-08-12 1708 }
e34212c75a6899 Dmitry Osipenko 2019-08-12 1709
diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c index 9eae25c57ec6..496b42c4c1a8 100644 --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -1696,11 +1696,7 @@ static int tegra_emc_suspend(struct device *dev) int err; /* take exclusive control over the clock's rate */ - err = clk_rate_exclusive_get(emc->clk); - if (err) { - dev_err(emc->dev, "failed to acquire clk: %d\n", err); - return err; - } + clk_rate_exclusive_get(emc->clk); /* suspending in a bad state will hang machine */ if (WARN(emc->bad_state, "hardware in a bad state\n"))
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/tegra30-emc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)