Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396804

[PATCH 4.5 26/88] clk: xgene: Add missing parenthesis when clearing divider value

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.5 26/88] clk: xgene: Add missing parenthesis when clearing divider value
Date 2016-05-09 10:00 +0200
Message-ID <rwOgG-II-17@gated-at.bofh.it> (permalink)
References <rwNNE-7J-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Loc Ho <lho@apm.com>

commit 0f4c7a138dfefb0ebdbaf56e3ba2acd2958a6605 upstream.

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>
Fixes: 1382ea631ddd ("clk: xgene: Fix divider with non-zero shift value")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/clk-xgene.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -351,8 +351,8 @@ static int xgene_clk_set_rate(struct clk
 		/* 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);

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 4.5 26/88] clk: xgene: Add missing parenthesis when clearing divider value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 4.5 41/88] propogate_mnt: Handle the first propogated copy being a slave Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 4.5 39/88] mm, cma: prevent nr_isolated_* counters from going negative Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 4.5 35/88] tracing: Dont display trigger file for events that cant be enabled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 4.5 44/88] ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 4.5 23/88] clk: versatile: sp810: support reentrance Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 4.5 36/88] MD: make bio mergeable Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 4.5 38/88] mm: memcontrol: let v2 cgroups follow changes in system swappiness Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  Re: [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:10 +0200
    Re: [PATCH 4.5 00/88] 4.5.4-stable review Kevin Hilman <khilman@baylibre.com> - 2016-05-11 11:50 +0200
  Re: [PATCH 4.5 00/88] 4.5.4-stable review Guenter Roeck <linux@roeck-us.net> - 2016-05-09 15:10 +0200
    Re: [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-10 09:10 +0200
  Re: [PATCH 4.5 00/88] 4.5.4-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-05-09 21:50 +0200
    Re: [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-10 09:10 +0200

csiph-web