From: Adam Ford <aford173@gmail.com>
To: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
Adam Ford-BE <aford@beaconembedded.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: ethernet: ravb: Fix release of refclk
Date: Wed, 21 Apr 2021 11:03:08 -0500 [thread overview]
Message-ID: <CAHCN7xJa9RsK0kbGR8JCV1i2WdPXjYQDJ5hqYNzdQZWxcyPoGg@mail.gmail.com> (raw)
In-Reply-To: <3937a792-8985-10c1-b818-af2fbc2241df@gmail.com>
On Wed, Apr 21, 2021 at 9:25 AM Sergei Shtylyov
<sergei.shtylyov@gmail.com> wrote:
>
> On 4/21/21 5:05 PM, Adam Ford wrote:
>
> > The call to clk_disable_unprepare() can happen before priv is
> > initialized.
>
> This still doesn't make sense for me...
>
I need an external reference clock enabled by a programmable clock so
I added functionality to turn it on. [1] When I did it, I was
reminded to disable the clock in the event of an the error condition.
I originally added a call to clk_disable_unprepare(priv->refclk)
under the label called out_release, but a bot responded to me that we
may jump to this error condition before priv is initialized.
This fix is supposed to create a new label so the errors that happen
after the refclk is initialized will get disabled, but any errors that
happen before the clock is initialized will handle errors like they
did before.
Does that help explain things better?
adam
[1] - https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=8ef7adc6beb2ef0bce83513dc9e4505e7b21e8c2
> > This means moving clk_disable_unprepare out of
> ^ call
> > out_release into a new label.
> >
> > Fixes: 8ef7adc6beb2 ("net: ethernet: ravb: Enable optional refclk")
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
>
>
> [...]
>
> MBR, Sergei
next prev parent reply other threads:[~2021-04-21 16:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 14:05 [PATCH] net: ethernet: ravb: Fix release of refclk Adam Ford
2021-04-21 14:25 ` Sergei Shtylyov
2021-04-21 16:03 ` Adam Ford [this message]
2021-04-21 18:20 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2021-04-17 13:23 Adam Ford
2021-04-19 8:02 ` Geert Uytterhoeven
2021-04-19 9:38 ` Sergei Shtylyov
2021-04-19 22:45 ` David Miller
2021-04-20 3:33 ` Adam Ford
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=CAHCN7xJa9RsK0kbGR8JCV1i2WdPXjYQDJ5hqYNzdQZWxcyPoGg@mail.gmail.com \
--to=aford173@gmail.com \
--cc=aford@beaconembedded.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@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.