From: b20788@freescale.com (Anson Huang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: imx: using unsigned variable for do_div
Date: Fri, 8 May 2015 00:16:51 +0800 [thread overview]
Message-ID: <1431015411-8432-1-git-send-email-b20788@freescale.com> (raw)
The definition of do_div uses unsigned long long
variable as its first parameter, better to pass
a u64 variable as first parameter when calling
do_div function.
Signed-off-by: Anson Huang <b20788@freescale.com>
---
drivers/clk/imx/clk-pllv3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c
index e34a925..8a94fa6 100644
--- a/drivers/clk/imx/clk-pllv3.c
+++ b/drivers/clk/imx/clk-pllv3.c
@@ -220,7 +220,7 @@ static long clk_pllv3_av_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long max_rate = parent_rate * 54;
u32 div;
u32 mfn, mfd = 1000000;
- s64 temp64;
+ u64 temp64;
if (rate > max_rate)
rate = max_rate;
@@ -244,7 +244,7 @@ static int clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long max_rate = parent_rate * 54;
u32 val, div;
u32 mfn, mfd = 1000000;
- s64 temp64;
+ u64 temp64;
if (rate < min_rate || rate > max_rate)
return -EINVAL;
--
1.9.1
next reply other threads:[~2015-05-07 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 16:16 Anson Huang [this message]
2015-05-07 8:58 ` [PATCH] ARM: imx: using unsigned variable for do_div Uwe Kleine-König
2015-05-07 11:39 ` Shawn Guo
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=1431015411-8432-1-git-send-email-b20788@freescale.com \
--to=b20788@freescale.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).