From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Richard GENOUD <richard.genoud@bootlin.com>
Cc: "Lei Liu" <liulei.rjpt@vivo.com>,
"Paul Cercueil" <paul@crapouillou.net>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Sudeep Holla" <sudeep.holla@arm.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Andreas Färber" <afaerber@suse.de>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Patrice Chotard" <patrice.chotard@foss.st.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Andi Shyti" <andi.shyti@linux.intel.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"John Ogness" <john.ogness@linutronix.de>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Jeff Johnson" <quic_jjohnson@quicinc.com>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Valentin Caron" <valentin.caron@foss.st.com>,
"Lino Sanfilippo" <l.sanfilippo@kunbus.com>,
"Erwan Le Ray" <erwan.leray@foss.st.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-actions@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
opensource.kernel@vivo.com
Subject: Re: [PATCH 4/8] tty: atmel_serial: Use devm_clk_get_enabled() helpers
Date: Thu, 22 Aug 2024 16:34:28 +0300 [thread overview]
Message-ID: <Zsc-ZNg_S8uT9gpR@smile.fi.intel.com> (raw)
In-Reply-To: <c54434e3-1fb8-4491-b24f-2167786fe84c@bootlin.com>
On Thu, Aug 22, 2024 at 03:28:40PM +0200, Richard GENOUD wrote:
> Le 22/08/2024 à 05:39, Lei Liu a écrit :
> > The devm_clk_get_enabled() helpers:
> > - call devm_clk_get()
> > - call clk_prepare_enable() and register what is needed in order to
> > call clk_disable_unprepare() when needed, as a managed resource.
> >
> > This simplifies the code and avoids calls to clk_disable_unprepare().
...
> > * The peripheral clock can now safely be disabled till the port
> > * is used
> > */
> > - clk_disable_unprepare(atmel_port->clk);
> > -
> Why removing this ?
> This is not an error path.
Good point, I wouldn't apply this patch as well as a few others in this series
due to this reason.
Instead it might make sense to add a comment on top of devm_clk_get() to
explain why _enabled() variant is *not* used.
--
With Best Regards,
Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Richard GENOUD <richard.genoud@bootlin.com>
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Valentin Caron" <valentin.caron@foss.st.com>,
"Erwan Le Ray" <erwan.leray@foss.st.com>,
"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Paul Cercueil" <paul@crapouillou.net>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
linux-stm32@st-md-mailman.stormreply.com,
opensource.kernel@vivo.com,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
linux-arm-kernel@lists.infradead.org,
"Andi Shyti" <andi.shyti@linux.intel.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-mips@vger.kernel.org,
"Patrice Chotard" <patrice.chotard@foss.st.com>,
"Lei Liu" <liulei.rjpt@vivo.com>,
"John Ogness" <john.ogness@linutronix.de>,
linux-kernel@vger.kernel.org, linux-actions@lists.infradead.org,
linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org,
"Thomas Gleixner" <tglx@linutronix.de>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Lino Sanfilippo" <l.sanfilippo@kunbus.com>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Sudeep Holla" <sudeep.holla@arm.com>,
"Jeff Johnson" <quic_jjohnson@quicinc.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [PATCH 4/8] tty: atmel_serial: Use devm_clk_get_enabled() helpers
Date: Thu, 22 Aug 2024 16:34:28 +0300 [thread overview]
Message-ID: <Zsc-ZNg_S8uT9gpR@smile.fi.intel.com> (raw)
In-Reply-To: <c54434e3-1fb8-4491-b24f-2167786fe84c@bootlin.com>
On Thu, Aug 22, 2024 at 03:28:40PM +0200, Richard GENOUD wrote:
> Le 22/08/2024 à 05:39, Lei Liu a écrit :
> > The devm_clk_get_enabled() helpers:
> > - call devm_clk_get()
> > - call clk_prepare_enable() and register what is needed in order to
> > call clk_disable_unprepare() when needed, as a managed resource.
> >
> > This simplifies the code and avoids calls to clk_disable_unprepare().
...
> > * The peripheral clock can now safely be disabled till the port
> > * is used
> > */
> > - clk_disable_unprepare(atmel_port->clk);
> > -
> Why removing this ?
> This is not an error path.
Good point, I wouldn't apply this patch as well as a few others in this series
due to this reason.
Instead it might make sense to add a comment on top of devm_clk_get() to
explain why _enabled() variant is *not* used.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-08-22 13:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 3:39 [PATCH 0/8] tty serial drivers use devm_clk_get_enabled() helpers Lei Liu
2024-08-22 3:39 ` [PATCH 1/8] tty: 8250_ingenic: Use " Lei Liu
2024-08-22 9:40 ` Paul Cercueil
2024-08-22 13:24 ` Andy Shevchenko
2024-08-22 13:24 ` Andy Shevchenko
2024-08-22 13:09 ` Andy Shevchenko
2024-08-22 13:09 ` Andy Shevchenko
2024-08-22 3:39 ` [PATCH 2/8] tty: 8250_tegra: " Lei Liu
2024-08-22 13:10 ` Andy Shevchenko
2024-08-22 13:10 ` Andy Shevchenko
2024-08-22 3:39 ` [PATCH 3/8] tty: 8250_uniphier: " Lei Liu
2024-08-22 3:39 ` [PATCH 4/8] tty: atmel_serial: " Lei Liu
2024-08-22 13:28 ` Richard GENOUD
2024-08-22 13:28 ` Richard GENOUD
2024-08-22 13:34 ` Andy Shevchenko [this message]
2024-08-22 13:34 ` Andy Shevchenko
2024-08-22 14:33 ` Alexandre Belloni
2024-08-22 14:33 ` Alexandre Belloni
2024-08-22 3:39 ` [PATCH 5/8] tty: mps2-uart: " Lei Liu
2024-08-22 13:19 ` Andy Shevchenko
2024-08-22 13:19 ` Andy Shevchenko
2024-08-22 13:29 ` Lei Liu
2024-08-22 13:29 ` Lei Liu
2024-08-22 17:20 ` kernel test robot
2024-08-22 3:39 ` [PATCH 6/8] tty: owl-uart: " Lei Liu
2024-08-22 3:39 ` [PATCH 7/8] tty: st-asc: " Lei Liu
2024-08-22 13:21 ` Andy Shevchenko
2024-08-22 13:21 ` Andy Shevchenko
2024-08-22 3:39 ` [PATCH 8/8] tty: stm32-usart: " Lei Liu
2024-08-22 13:23 ` Andy Shevchenko
2024-08-22 13:23 ` Andy Shevchenko
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=Zsc-ZNg_S8uT9gpR@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=afaerber@suse.de \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andi.shyti@linux.intel.com \
--cc=bigeasy@linutronix.de \
--cc=claudiu.beznea@tuxon.dev \
--cc=erwan.leray@foss.st.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=hayashi.kunihiko@socionext.com \
--cc=jirislaby@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=jonathanh@nvidia.com \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-actions@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-tegra@vger.kernel.org \
--cc=liulei.rjpt@vivo.com \
--cc=liviu.dudau@arm.com \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=mhiramat@kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=opensource.kernel@vivo.com \
--cc=patrice.chotard@foss.st.com \
--cc=paul@crapouillou.net \
--cc=quic_jjohnson@quicinc.com \
--cc=richard.genoud@bootlin.com \
--cc=sudeep.holla@arm.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=valentin.caron@foss.st.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.