Linux USB
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Zhang Zekun <zhangzekun11@huawei.com>
Cc: patchwork@huawei.com, Thinh.Nguyen@synopsys.com,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com,
	linux-usb@vger.kernel.org, vz@mleia.com,
	stern@rowland.harvard.edu
Subject: Re: [PATCH 1/2] usb: dwc3: Use helper function devm_clk_get_enabled()
Date: Wed, 4 Sep 2024 10:49:06 +0200	[thread overview]
Message-ID: <2024090400-enforced-unmarked-eea8@gregkh> (raw)
In-Reply-To: <20240902123020.29267-2-zhangzekun11@huawei.com>

On Mon, Sep 02, 2024 at 08:30:19PM +0800, Zhang Zekun wrote:
> devm_clk_get() and clk_prepare_enable() can be replaced by helper
> function devm_clk_get_enabled(). Let's use devm_clk_get_enabled() to
> simplify code and avoid calling clk_disable_unprepare().
> 
> Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>

Also, have you tested that this actually works?  using devm can have
tricky sync issues when shutting down so I'm going to start requiring
that any conversions like this be proven to work properly on real
hardware.

thanks,

greg k-h

  parent reply	other threads:[~2024-09-04  8:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02 12:30 [PATCH 0/2] Use helper function devm_clk_get_enabled() Zhang Zekun
2024-09-02 12:30 ` [PATCH 1/2] usb: dwc3: " Zhang Zekun
2024-09-03 22:06   ` Thinh Nguyen
2024-09-04  8:49   ` Greg KH [this message]
2024-09-05  1:13     ` zhangzekun (A)
2024-09-02 12:30 ` [PATCH 2/2] usb: ohci-nxp: " Zhang Zekun
2024-09-02 13:59   ` Alan Stern

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=2024090400-enforced-unmarked-eea8@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=patchwork@huawei.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=vz@mleia.com \
    --cc=zhangzekun11@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox