* [PATCH] clk: xgene: Add missing parenthesis when clearing divider value
@ 2016-02-29 21:15 Loc Ho
2016-03-03 19:37 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Loc Ho @ 2016-02-29 21:15 UTC (permalink / raw)
To: mturquette, sboyd
Cc: linux-arm-kernel, linux-clk, patches, luis.henriques, kamal,
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 <lho@apm.com>
Acked-by: Toan Le <toanle@apm.com>
---
drivers/clk/clk-xgene.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
index bd7156b..d73450b 100644
--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -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);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: xgene: Add missing parenthesis when clearing divider value
2016-02-29 21:15 [PATCH] clk: xgene: Add missing parenthesis when clearing divider value Loc Ho
@ 2016-03-03 19:37 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2016-03-03 19:37 UTC (permalink / raw)
To: Loc Ho
Cc: mturquette, linux-arm-kernel, linux-clk, patches, luis.henriques,
kamal
On 02/29, Loc Ho wrote:
> 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 <lho@apm.com>
> Acked-by: Toan Le <toanle@apm.com>
> ---
Applied to clk-next + added a fixes tag.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-03 19:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 21:15 [PATCH] clk: xgene: Add missing parenthesis when clearing divider value Loc Ho
2016-03-03 19:37 ` 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).