clk: xgene: Add missing parenthesis when clearing divider value
PATCH 1/1 clk: xgene: Add missing parenthesis when clearing divider value
In the initial fix for non-zero divider shift value, the parenthesis was missing after the negate operation. This patch adds the required parenthesis. Otherwise, lower bits may be cleared unintentionally.
Signed-off-by Loc Ho <[email protected]>
Acked-by Toan Le <[email protected]>
--- drivers/clk/clk-xgene.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/clk/clk-xgene.c +2 -2
@@ -376,8 +376,8 @@ static int xgene_clk_set_rate(struct clk_hw *hw, unsigned long rate,/* Set new divider */ data =xgene_clk_read (pclk->param.divider_reg + pclk->param.reg_divider_offset); - data &= ~((1 << pclk->param.reg_divider_width) -1 ) - << pclk->param.reg_divider_shift; + data &= ~(((1 << pclk->param.reg_divider_width) -1 ) + << pclk->param.reg_divider_shift); data |= divider;xgene_clk_write (data, pclk->param.divider_reg + pclk->param.reg_divider_offset);
Signature · 1 line
1.7.1
Stephen Boyd
AppliedPATCH 1/1 clk: xgene: Add missing parenthesis when clearing divider value
Quoted 7 lines · Loc Ho
In the initial fix for non-zero divider shift value, the parenthesis was missing after the negate operation. This patch adds the required parenthesis. Otherwise, lower bits may be cleared unintentionally.
Signed-off-by Loc Ho <[email protected]>Acked-by Toan Le <[email protected]>---
Applied to clk-next + added a fixes tag.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project