[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211215060019.441549-1-chi.minghao@zte.com.cn>
Date: Wed, 15 Dec 2021 06:00:19 +0000
From: cgel.zte@...il.com
To: pdeschrijver@...dia.com
Cc: pgaikwad@...dia.com, mturquette@...libre.com, sboyd@...nel.org,
thierry.reding@...il.com, jonathanh@...dia.com,
linux-clk@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH clk-next] drivers/clk: remove redundant result variable
From: Minghao Chi <chi.minghao@....com.cn>
Return value from FIELD_GET() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....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
Powered by blists - more mailing lists