From: Frieder Schrempf <frieder.schrempf@kontron.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: Frieder Schrempf <frieder@fris.de>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Matthias Kaehlcke <mka@chromium.org>,
Anand Moon <linux.amoon@gmail.com>,
Benjamin Bara <benjamin.bara@skidata.com>,
Icenowy Zheng <uwu@icenowy.me>, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH 1/2] usb: misc: onboard_usb_hub: Add support for clock input
Date: Mon, 27 Nov 2023 12:17:19 +0100 [thread overview]
Message-ID: <158cf11e-53fa-4af8-a8a5-db18d43d0abb@kontron.de> (raw)
In-Reply-To: <20231123173610.d6ytwlpbpcqng5pv@pengutronix.de>
Hi Greg, hi Uwe,
thanks for reviewing!
On 23.11.23 18:36, Uwe Kleine-König wrote:
> Hello,
>
> On Thu, Nov 23, 2023 at 01:55:57PM +0000, Greg Kroah-Hartman wrote:
>> On Thu, Nov 23, 2023 at 02:47:20PM +0100, Frieder Schrempf wrote:
>>> + err = clk_prepare_enable(hub->clk);
>>> + if (err) {
>>> + dev_err(hub->dev, "failed to enable clock: %d\n", err);
>>> + return err;
>
> I suggest to use %pe (and ERR_PTR(err)) here.
Ok, I added this in v2. I also added a patch to convert the other error
logs to be consistent within the driver.
>
>>> + }
>>
>> But what happens if clk is not set here?
>
> clk_prepare_enable() just does "return 0" if the clk argument is NULL.
Exactly!
>
>> And doesn't clk_prepare_enable() print out a message if it fails?
>
> clk_prepare_enable is silent on errors.
Right!
Thanks
Frieder
prev parent reply other threads:[~2023-11-27 11:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 13:47 [PATCH 1/2] usb: misc: onboard_usb_hub: Add support for clock input Frieder Schrempf
2023-11-23 13:47 ` [PATCH 2/2] usb: misc: onboard_usb_hub: Add support for Cypress CY7C6563x Frieder Schrempf
2023-11-23 13:55 ` [PATCH 1/2] usb: misc: onboard_usb_hub: Add support for clock input Greg Kroah-Hartman
2023-11-23 17:36 ` Uwe Kleine-König
2023-11-27 11:17 ` Frieder Schrempf [this message]
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=158cf11e-53fa-4af8-a8a5-db18d43d0abb@kontron.de \
--to=frieder.schrempf@kontron.de \
--cc=benjamin.bara@skidata.com \
--cc=frieder@fris.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux.amoon@gmail.com \
--cc=mka@chromium.org \
--cc=robh@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=uwu@icenowy.me \
/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