[PATCH clk-next] drivers/clk: remove redundant result variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Minghao Chi <chi.minghao@xxxxxxxxxx>

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

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx>
---
 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




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux