linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: chao.xie@marvell.com (Chao Xie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] clk: mmp: fix wrong mask when calculate denominator
Date: Thu, 23 Jan 2014 10:47:40 +0800	[thread overview]
Message-ID: <1390445262-27486-2-git-send-email-chao.xie@marvell.com> (raw)
In-Reply-To: <1390445262-27486-1-git-send-email-chao.xie@marvell.com>

From: Chao Xie <chao.xie@marvell.com>

The code has typo when calculate denominator. It should use
den_mask instead of num_mask.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
---
 drivers/clk/mmp/clk-frac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c
index 80c1dd1..f6e7691 100644
--- a/drivers/clk/mmp/clk-frac.c
+++ b/drivers/clk/mmp/clk-frac.c
@@ -64,7 +64,7 @@ static unsigned long clk_factor_recalc_rate(struct clk_hw *hw,
 	num = (val >> masks->num_shift) & masks->num_mask;
 
 	/* calculate denominator */
-	den = (val >> masks->den_shift) & masks->num_mask;
+	den = (val >> masks->den_shift) & masks->den_mask;
 
 	if (!den)
 		return 0;
-- 
1.8.3.2

  reply	other threads:[~2014-01-23  2:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23  2:47 [PATCH 0/3] clk: mmp: bug fix for clk-frac Chao Xie
2014-01-23  2:47 ` Chao Xie [this message]
2014-01-23  2:47 ` [PATCH 2/3] clk: mmp: fix the wrong calculation formula Chao Xie
2014-01-23  2:47 ` [PATCH 3/3] clk: mmp: try to use closer one when do round rate Chao Xie
2014-02-13  6:41 ` [PATCH 0/3] clk: mmp: bug fix for clk-frac Chao Xie
2014-03-27  4:37 ` Mike Turquette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390445262-27486-2-git-send-email-chao.xie@marvell.com \
    --to=chao.xie@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).