* [PATCH] clk: actions: remove redundant assignment after a mask operation
@ 2022-04-18 14:15 Colin Ian King
2022-04-23 2:01 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-04-18 14:15 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Andreas Färber,
Manivannan Sadhasivam, linux-clk, linux-arm-kernel, linux-actions
Cc: kernel-janitors, linux-kernel, llvm
The assignment operation after a & mask operation is redundant,
the &= operator can be replaced with just the & operator.
Cleans up a clang-scan warning:
drivers/clk/actions/owl-pll.c:28:9: warning: Although the value
stored to 'mul' is used in the enclosing expression, the value is
never actually read from 'mul' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/clk/actions/owl-pll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/actions/owl-pll.c b/drivers/clk/actions/owl-pll.c
index 02437bdedf4d..155f313986b4 100644
--- a/drivers/clk/actions/owl-pll.c
+++ b/drivers/clk/actions/owl-pll.c
@@ -25,7 +25,7 @@ static u32 owl_pll_calculate_mul(struct owl_pll_hw *pll_hw, unsigned long rate)
else if (mul > pll_hw->max_mul)
mul = pll_hw->max_mul;
- return mul &= mul_mask(pll_hw);
+ return mul & mul_mask(pll_hw);
}
static unsigned long _get_table_rate(const struct clk_pll_table *table,
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: actions: remove redundant assignment after a mask operation
2022-04-18 14:15 [PATCH] clk: actions: remove redundant assignment after a mask operation Colin Ian King
@ 2022-04-23 2:01 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2022-04-23 2:01 UTC (permalink / raw)
To: Andreas Färber, Colin Ian King, Manivannan Sadhasivam,
Michael Turquette, linux-actions, linux-arm-kernel, linux-clk
Cc: kernel-janitors, linux-kernel, llvm
Quoting Colin Ian King (2022-04-18 07:15:37)
> The assignment operation after a & mask operation is redundant,
> the &= operator can be replaced with just the & operator.
>
> Cleans up a clang-scan warning:
> drivers/clk/actions/owl-pll.c:28:9: warning: Although the value
> stored to 'mul' is used in the enclosing expression, the value is
> never actually read from 'mul' [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-23 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-18 14:15 [PATCH] clk: actions: remove redundant assignment after a mask operation Colin Ian King
2022-04-23 2:01 ` 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).