From: Tero Kristo <t-kristo@ti.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>,
Michael Turquette <mturquette@baylibre.com>
Cc: <linux-omap@vger.kernel.org>, <linux-clk@vger.kernel.org>
Subject: Re: [PATCH] ti/clkt_dpll: fix wrong do_div() usage
Date: Tue, 24 Nov 2015 11:35:17 +0200 [thread overview]
Message-ID: <56542F55.1070502@ti.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1511032306560.630@knanqh.ubzr>
On 11/04/2015 06:09 AM, Nicolas Pitre wrote:
> do_div() is meant to be used with an unsigned dividend.
>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
Fixed Subject locally to format "clk: ti: %s".
Queued for 4.4-rc fixes, thanks.
-Tero
>
> diff --git a/drivers/clk/ti/clkt_dpll.c b/drivers/clk/ti/clkt_dpll.c
> index 9023ca9caf..b5cc6f66ae 100644
> --- a/drivers/clk/ti/clkt_dpll.c
> +++ b/drivers/clk/ti/clkt_dpll.c
> @@ -240,7 +240,7 @@ u8 omap2_init_dpll_parent(struct clk_hw *hw)
> */
> unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
> {
> - long long dpll_clk;
> + u64 dpll_clk;
> u32 dpll_mult, dpll_div, v;
> struct dpll_data *dd;
>
> @@ -262,7 +262,7 @@ unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
> dpll_div = v & dd->div1_mask;
> dpll_div >>= __ffs(dd->div1_mask);
>
> - dpll_clk = (long long)clk_get_rate(dd->clk_ref) * dpll_mult;
> + dpll_clk = (u64)clk_get_rate(dd->clk_ref) * dpll_mult;
> do_div(dpll_clk, dpll_div + 1);
>
> return dpll_clk;
>
WARNING: multiple messages have this Message-ID (diff)
From: Tero Kristo <t-kristo@ti.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>,
Michael Turquette <mturquette@baylibre.com>
Cc: linux-omap@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH] ti/clkt_dpll: fix wrong do_div() usage
Date: Tue, 24 Nov 2015 11:35:17 +0200 [thread overview]
Message-ID: <56542F55.1070502@ti.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1511032306560.630@knanqh.ubzr>
On 11/04/2015 06:09 AM, Nicolas Pitre wrote:
> do_div() is meant to be used with an unsigned dividend.
>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
Fixed Subject locally to format "clk: ti: %s".
Queued for 4.4-rc fixes, thanks.
-Tero
>
> diff --git a/drivers/clk/ti/clkt_dpll.c b/drivers/clk/ti/clkt_dpll.c
> index 9023ca9caf..b5cc6f66ae 100644
> --- a/drivers/clk/ti/clkt_dpll.c
> +++ b/drivers/clk/ti/clkt_dpll.c
> @@ -240,7 +240,7 @@ u8 omap2_init_dpll_parent(struct clk_hw *hw)
> */
> unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
> {
> - long long dpll_clk;
> + u64 dpll_clk;
> u32 dpll_mult, dpll_div, v;
> struct dpll_data *dd;
>
> @@ -262,7 +262,7 @@ unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
> dpll_div = v & dd->div1_mask;
> dpll_div >>= __ffs(dd->div1_mask);
>
> - dpll_clk = (long long)clk_get_rate(dd->clk_ref) * dpll_mult;
> + dpll_clk = (u64)clk_get_rate(dd->clk_ref) * dpll_mult;
> do_div(dpll_clk, dpll_div + 1);
>
> return dpll_clk;
>
next prev parent reply other threads:[~2015-11-24 9:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 4:09 [PATCH] ti/clkt_dpll: fix wrong do_div() usage Nicolas Pitre
2015-11-24 9:35 ` Tero Kristo [this message]
2015-11-24 9:35 ` Tero Kristo
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=56542F55.1070502@ti.com \
--to=t-kristo@ti.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=nicolas.pitre@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.