From: Tony Lindgren <tony@atomide.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Michael Turquette <mturquette@linaro.org>,
Paul Walmsley <paul@pwsan.com>, Tero Kristo <t-kristo@ti.com>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>
Subject: Re: [PATCH] ARM: OMAP2+: Fix bogus struct clk comparison for timer clock
Date: Wed, 6 May 2015 07:55:39 -0700 [thread overview]
Message-ID: <20150506145539.GI21061@atomide.com> (raw)
In-Reply-To: <20150506053539.GA10871@codeaurora.org>
* Stephen Boyd <sboyd@codeaurora.org> [150505 22:36]:
> On 05/05, Tony Lindgren wrote:
> > With recent changes to use determine_rate, the comparison of two
> > clocks won't work without doing __clk_get_hw on the clocks
> > first.
> >
> > Cc: Michael Turquette <mturquette@linaro.org>
> > Cc: Paul Walmsley <paul@pwsan.com>
> > Cc: Stephen Boyd <sboyd@codeaurora.org>
> > Cc: Tero Kristo <t-kristo@ti.com>
> > Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >
> > Found one more of these, the coccinelle scripts do not seem
> > to match this?
>
> I don't think the coccinelle script was ever merged...
Oh OK, but the wrong comparisons in the kernel code got
fixed, right?
> > @@ -298,7 +299,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> > if (IS_ERR(src))
> > return PTR_ERR(src);
> >
> > - if (clk_get_parent(timer->fclk) != src) {
> > + if (__clk_get_hw(clk_get_parent(timer->fclk)) != __clk_get_hw(src)) {
>
> Please use clk_is_match() instead so we can find these instances
> with an easy grep.
Thanks here's an updated version with that.
Regards,
Tony
8< -----------------------------
From: Tony Lindgren <tony@atomide.com>
Date: Tue, 5 May 2015 09:03:34 -0700
Subject: [PATCH] ARM: OMAP2+: Fix bogus struct clk comparison for timer clock
With recent changes to use determine_rate, the comparison of two
clocks won't work without clk_is_match that does __clk_get_hw
on the clocks first.
Cc: Michael Turquette <mturquette@linaro.org>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -298,7 +298,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (IS_ERR(src))
return PTR_ERR(src);
- if (clk_get_parent(timer->fclk) != src) {
+ if (!clk_is_match(clk_get_parent(timer->fclk), src)) {
r = clk_set_parent(timer->fclk, src);
if (r < 0) {
pr_warn("%s: %s cannot set source\n", __func__,
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: Fix bogus struct clk comparison for timer clock
Date: Wed, 6 May 2015 07:55:39 -0700 [thread overview]
Message-ID: <20150506145539.GI21061@atomide.com> (raw)
In-Reply-To: <20150506053539.GA10871@codeaurora.org>
* Stephen Boyd <sboyd@codeaurora.org> [150505 22:36]:
> On 05/05, Tony Lindgren wrote:
> > With recent changes to use determine_rate, the comparison of two
> > clocks won't work without doing __clk_get_hw on the clocks
> > first.
> >
> > Cc: Michael Turquette <mturquette@linaro.org>
> > Cc: Paul Walmsley <paul@pwsan.com>
> > Cc: Stephen Boyd <sboyd@codeaurora.org>
> > Cc: Tero Kristo <t-kristo@ti.com>
> > Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >
> > Found one more of these, the coccinelle scripts do not seem
> > to match this?
>
> I don't think the coccinelle script was ever merged...
Oh OK, but the wrong comparisons in the kernel code got
fixed, right?
> > @@ -298,7 +299,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> > if (IS_ERR(src))
> > return PTR_ERR(src);
> >
> > - if (clk_get_parent(timer->fclk) != src) {
> > + if (__clk_get_hw(clk_get_parent(timer->fclk)) != __clk_get_hw(src)) {
>
> Please use clk_is_match() instead so we can find these instances
> with an easy grep.
Thanks here's an updated version with that.
Regards,
Tony
8< -----------------------------
From: Tony Lindgren <tony@atomide.com>
Date: Tue, 5 May 2015 09:03:34 -0700
Subject: [PATCH] ARM: OMAP2+: Fix bogus struct clk comparison for timer clock
With recent changes to use determine_rate, the comparison of two
clocks won't work without clk_is_match that does __clk_get_hw
on the clocks first.
Cc: Michael Turquette <mturquette@linaro.org>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -298,7 +298,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (IS_ERR(src))
return PTR_ERR(src);
- if (clk_get_parent(timer->fclk) != src) {
+ if (!clk_is_match(clk_get_parent(timer->fclk), src)) {
r = clk_set_parent(timer->fclk, src);
if (r < 0) {
pr_warn("%s: %s cannot set source\n", __func__,
next prev parent reply other threads:[~2015-05-06 14:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 18:02 [PATCH] ARM: OMAP2+: Fix bogus struct clk comparison for timer clock Tony Lindgren
2015-05-05 18:02 ` Tony Lindgren
2015-05-06 5:35 ` Stephen Boyd
2015-05-06 5:35 ` Stephen Boyd
2015-05-06 14:55 ` Tony Lindgren [this message]
2015-05-06 14:55 ` Tony Lindgren
2015-05-07 0:29 ` Stephen Boyd
2015-05-07 0:29 ` Stephen Boyd
2015-05-07 14:44 ` Tony Lindgren
2015-05-07 14:44 ` Tony Lindgren
2015-05-07 19:01 ` Stephen Boyd
2015-05-07 19:01 ` Stephen Boyd
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=20150506145539.GI21061@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=paul@pwsan.com \
--cc=sboyd@codeaurora.org \
--cc=t-kristo@ti.com \
--cc=tomeu.vizoso@collabora.com \
/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.