lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH clk-next] drivers/clk: remove redundant result variable
Date
From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from FIELD_GET() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/clk/tegra/clk-tegra210-emc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/tegra/clk-tegra210-emc.c b/drivers/clk/tegra/clk-tegra210-emc.c
index 672ca8c184d2..481fd50a36a0 100644
--- a/drivers/clk/tegra/clk-tegra210-emc.c
+++ b/drivers/clk/tegra/clk-tegra210-emc.c
@@ -52,12 +52,10 @@ static u8 tegra210_clk_emc_get_parent(struct clk_hw *hw)
{
struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw);
u32 value;
- u8 src;

value = readl_relaxed(emc->regs + CLK_SOURCE_EMC);
- src = FIELD_GET(CLK_SOURCE_EMC_2X_CLK_SRC, value);

- return src;
+ return FIELD_GET(CLK_SOURCE_EMC_2X_CLK_SRC, value);
}

static unsigned long tegra210_clk_emc_recalc_rate(struct clk_hw *hw,
--
2.25.1
\
 
 \ /
  Last update: 2021-12-15 07:00    [W:0.040 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site