* [PATCH clk-next] drivers/clk: remove redundant result variable
@ 2021-12-15 6:00 cgel.zte
2022-01-12 20:43 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-12-15 6:00 UTC (permalink / raw)
To: pdeschrijver
Cc: pgaikwad, mturquette, sboyd, thierry.reding, jonathanh, linux-clk,
linux-tegra, linux-kernel, Minghao Chi, Zeal Robot
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH clk-next] drivers/clk: remove redundant result variable
2021-12-15 6:00 [PATCH clk-next] drivers/clk: remove redundant result variable cgel.zte
@ 2022-01-12 20:43 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2022-01-12 20:43 UTC (permalink / raw)
To: cgel.zte, pdeschrijver
Cc: pgaikwad, mturquette, thierry.reding, jonathanh, linux-clk,
linux-tegra, linux-kernel, Minghao Chi, Zeal Robot
Please fix the subject to include tegra
$ git log --oneline -2 -- drivers/clk/tegra
b1bc04a2ac5b clk: tegra: Support runtime PM and power domain
e360e116a0ee clk: tegra: Make vde a child of pll_p on tegra114
Quoting cgel.zte@gmail.com (2021-12-14 22:00:19)
> 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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-12 20:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-15 6:00 [PATCH clk-next] drivers/clk: remove redundant result variable cgel.zte
2022-01-12 20:43 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).