From: Mike Turquette <mturquette@linaro.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Shawn Guo <shawn.guo@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de,
Stephen Boyd <sboyd@codeaurora.org>,
Thierry Reding <thierry.reding@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Brown <broonie@kernel.org>,
linux-pwm@vger.kernel.org, alsa-devel@alsa-project.org,
dri-devel@lists.freedesktop.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH 0/8] Fix struct clk pointer comparing
Date: Wed, 25 Feb 2015 09:55:33 -0800 [thread overview]
Message-ID: <20150225175533.421.41831@quantum> (raw)
In-Reply-To: <20150225150349.GB8656@n2100.arm.linux.org.uk>
Quoting Russell King - ARM Linux (2015-02-25 07:03:49)
> On Wed, Feb 25, 2015 at 10:53:30PM +0800, Shawn Guo wrote:
> > On the first day back from Chinese new year holiday, I got a regression
> > report from rmk, saying Ethernet stops working on HimmingBoard with
> > v4.0-rc1.
> >
> > I read through the thread [1] and found a couple of i.MX audio drivers
> > are also affected per Stephen's Coccinelle report. That's why I came up
> > with this series based on Quentin's structclk.cocci, Stephen's result
> > and Mike's input (thanks all).
>
> Not all places need to be fixed in this way.
>
> There are two broad cases:
>
> 1. Where we are trying to determine if two clocks obtained from clk_get()
> are the same clock. IOW:
>
> probe()
> {
> clk1 = clk_get(dev, ...);
> clk2 = clk_get(dev, ...);
>
> if (clk1 == clk2)
> do_something();
> }
>
> 2. Where we are trying to determine if a clock selected from a set of
> previously obtained clk_get()'d clocks is the same as a one of those
> clocks. IOW:
>
> probe()
> {
> clk1 = clk_get(dev, ...);
> clk2 = clk_get(dev, ...);
> }
> ...
> some_fn()
> {
> clk = select_best_clock(clk1, clk2);
> if (clk == previously_selected_clk) {
> previously_selected_clk = clk;
> do_something();
> }
> }
>
> Case 1 applies in places like the Kirkwood I2S driver, and the iMX6
> ethernet code, and it's these cases which need to be fixed.
>
> Case 2 applies in the Armada DRM driver, and these cases need not be
> "fixed".
>
> To put it a different way: case 1 is when you're testing to see whether
> two clocks refer to the same clock. case 2 is when you're testing
> whether the cached clk cookie is the same.
It looks like patches 2, 7 and 8 are correct in this series. I'll apply
them towards -rc2 if nobody objects.
Regards,
Mike
>
> --
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.
WARNING: multiple messages have this Message-ID (diff)
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/8] Fix struct clk pointer comparing
Date: Wed, 25 Feb 2015 09:55:33 -0800 [thread overview]
Message-ID: <20150225175533.421.41831@quantum> (raw)
In-Reply-To: <20150225150349.GB8656@n2100.arm.linux.org.uk>
Quoting Russell King - ARM Linux (2015-02-25 07:03:49)
> On Wed, Feb 25, 2015 at 10:53:30PM +0800, Shawn Guo wrote:
> > On the first day back from Chinese new year holiday, I got a regression
> > report from rmk, saying Ethernet stops working on HimmingBoard with
> > v4.0-rc1.
> >
> > I read through the thread [1] and found a couple of i.MX audio drivers
> > are also affected per Stephen's Coccinelle report. That's why I came up
> > with this series based on Quentin's structclk.cocci, Stephen's result
> > and Mike's input (thanks all).
>
> Not all places need to be fixed in this way.
>
> There are two broad cases:
>
> 1. Where we are trying to determine if two clocks obtained from clk_get()
> are the same clock. IOW:
>
> probe()
> {
> clk1 = clk_get(dev, ...);
> clk2 = clk_get(dev, ...);
>
> if (clk1 == clk2)
> do_something();
> }
>
> 2. Where we are trying to determine if a clock selected from a set of
> previously obtained clk_get()'d clocks is the same as a one of those
> clocks. IOW:
>
> probe()
> {
> clk1 = clk_get(dev, ...);
> clk2 = clk_get(dev, ...);
> }
> ...
> some_fn()
> {
> clk = select_best_clock(clk1, clk2);
> if (clk == previously_selected_clk) {
> previously_selected_clk = clk;
> do_something();
> }
> }
>
> Case 1 applies in places like the Kirkwood I2S driver, and the iMX6
> ethernet code, and it's these cases which need to be fixed.
>
> Case 2 applies in the Armada DRM driver, and these cases need not be
> "fixed".
>
> To put it a different way: case 1 is when you're testing to see whether
> two clocks refer to the same clock. case 2 is when you're testing
> whether the cached clk cookie is the same.
It looks like patches 2, 7 and 8 are correct in this series. I'll apply
them towards -rc2 if nobody objects.
Regards,
Mike
>
> --
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.
next prev parent reply other threads:[~2015-02-25 17:55 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 14:53 [PATCH 0/8] Fix struct clk pointer comparing Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-25 14:53 ` [PATCH 1/8] clk: add helper function clk_is_match() Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-25 17:27 ` Mike Turquette
2015-02-25 17:27 ` Mike Turquette
2015-02-26 0:37 ` Shawn Guo
2015-02-26 0:37 ` Shawn Guo
2015-02-26 9:02 ` Ben Dooks
2015-02-26 9:02 ` [alsa-devel] " Ben Dooks
2015-02-26 9:56 ` Philipp Zabel
2015-02-26 9:56 ` Philipp Zabel
2015-02-26 11:25 ` Ben Dooks
2015-02-26 11:25 ` Ben Dooks
2015-02-26 11:59 ` Ricard Wanderlof
2015-02-26 11:59 ` Ricard Wanderlof
2015-03-04 8:55 ` Geert Uytterhoeven
2015-03-04 8:55 ` Geert Uytterhoeven
2015-03-04 9:51 ` Russell King - ARM Linux
2015-03-04 9:51 ` Russell King - ARM Linux
2015-03-08 21:05 ` [PATCH] clk: provide clk_is_match() dummy for non-common clk Arnd Bergmann
2015-03-08 21:05 ` Arnd Bergmann
2015-03-10 21:42 ` Geert Uytterhoeven
2015-03-10 21:42 ` Geert Uytterhoeven
2015-03-11 7:09 ` Uwe Kleine-König
2015-03-11 7:09 ` Uwe Kleine-König
2015-03-11 10:22 ` Russell King - ARM Linux
2015-03-11 10:22 ` Russell King - ARM Linux
2015-03-11 11:17 ` Uwe Kleine-König
2015-03-11 11:17 ` Uwe Kleine-König
2015-03-11 12:29 ` Russell King - ARM Linux
2015-03-11 12:29 ` Russell King - ARM Linux
2015-03-12 0:35 ` Stephen Boyd
2015-03-12 0:35 ` Stephen Boyd
2015-02-25 14:53 ` [PATCH 2/8] ARM: imx: fix struct clk pointer comparing Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-25 14:53 ` [PATCH 3/8] drm: armada: " Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-25 14:53 ` [PATCH 4/8] pwm: atmel-hlcdc: " Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-26 9:22 ` Nicolas Ferre
2015-02-26 9:22 ` Nicolas Ferre
2015-02-26 9:31 ` Boris Brezillon
2015-02-26 9:31 ` Boris Brezillon
2015-03-11 10:54 ` Thierry Reding
2015-03-11 10:54 ` Thierry Reding
2015-02-25 14:53 ` [PATCH 5/8] serial: samsung: " Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-25 14:53 ` [PATCH 6/8] ASoC: fsl_esai: " Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-26 2:36 ` Mark Brown
2015-02-26 2:36 ` Mark Brown
2015-02-25 14:53 ` [PATCH 7/8] ASoC: fsl_spdif: " Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-25 21:04 ` Stephen Boyd
2015-02-25 21:04 ` Stephen Boyd
2015-02-26 1:17 ` Shawn Guo
2015-02-26 1:17 ` Shawn Guo
2015-02-26 2:12 ` Mark Brown
2015-02-26 2:12 ` Mark Brown
2015-02-26 2:20 ` Shawn Guo
2015-02-26 2:20 ` Shawn Guo
2015-02-26 2:29 ` Mark Brown
2015-02-26 2:29 ` Mark Brown
2015-02-26 2:36 ` Mark Brown
2015-02-26 2:36 ` Mark Brown
2015-02-25 14:53 ` [PATCH 8/8] ASoC: kirkwood: " Shawn Guo
2015-02-25 14:53 ` Shawn Guo
2015-02-26 2:12 ` Mark Brown
2015-02-26 2:12 ` Mark Brown
2015-02-26 2:36 ` Mark Brown
2015-02-26 2:36 ` Mark Brown
2015-02-25 15:03 ` [PATCH 0/8] Fix " Russell King - ARM Linux
2015-02-25 15:03 ` Russell King - ARM Linux
2015-02-25 17:55 ` Mike Turquette [this message]
2015-02-25 17:55 ` Mike Turquette
2015-02-25 20:42 ` Stephen Boyd
2015-02-25 20:42 ` Stephen Boyd
2015-02-26 1:21 ` Shawn Guo
2015-02-26 1:21 ` Shawn Guo
2015-02-26 1:24 ` Mike Turquette
2015-02-26 1:24 ` 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=20150225175533.421.41831@quantum \
--to=mturquette@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sboyd@codeaurora.org \
--cc=shawn.guo@linaro.org \
--cc=thierry.reding@gmail.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.