diff mbox series

clk: actions: remove redundant assignment after a mask operation

Message ID 20220418141537.83994-1-colin.i.king@gmail.com (mailing list archive)
State New, archived
Headers show
Series clk: actions: remove redundant assignment after a mask operation | expand

Commit Message

Colin Ian King April 18, 2022, 2:15 p.m. UTC
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(-)

Comments

Stephen Boyd April 23, 2022, 2:01 a.m. UTC | #1
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
diff mbox series

Patch

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,