From: Dan Carpenter <error27@gmail.com>
To: Batu Ada Tutkun <batuadatutkun@gmail.com>
Cc: parthiban.veerasooran@microchip.com,
christian.gromm@microchip.com, gregkh@linuxfoundation.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: most: dim2: use dev_err_probe() for clock errors in rcar enable functions
Date: Tue, 23 Jun 2026 21:35:44 +0300 [thread overview]
Message-ID: <ajrSAIQUjTgAtuey@stanley.mountain> (raw)
In-Reply-To: <6a3ac564.561280e1.325e99.1bee@mx.google.com>
On Tue, Jun 23, 2026 at 10:41:56AM -0700, Batu Ada Tutkun wrote:
> Yes, this was drafted with AI assistance. Thank you for pointing it out.
>
> You are right that the error code was not broken here. rcar_gen2 and gen3 already return PTR_ERR(dev->clk), so unlike the fsl_mx6 case there is no -EFAULT bug to fix. This is just a consistency cleanup, plus devm_clk_get() can return -EPROBE_DEFER when the clock provider has not registered yet so dev_err_probe() suppresses the misleading "cannot get clock" message during a normal deferred probe.
I checked this and sure enough, clk_get() returns -EPROBE_DEFER. Please
specifically mention clk_get() in the commit message in case someone wants
to check the code...
Useless: grep "when the clock provider has not registered yet"
Useful: vim -t clk_get
>
> clk_prepare_enable() can't return -EPROBE_DEFER. By the time it is called the clock handle is already acquired and deferral only happens at acquisition. Because of that I deliberately left that path as dev_err().
>
> Compile tested only. I do not have R-Car hardware.
This is good information and it needs to be in the commit message under
the --- cut off line. Obviously, I know that changing dev_err() to
dev_err_probe() does not cause a problem, but I also want to know if this
is something which is already affecting users in real life or if it's
just a correctness thing.
So the patch is fine, but the commit message needs to be re-written.
regards,
dan carpenter
next prev parent reply other threads:[~2026-06-23 18:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 12:42 [PATCH] staging: most: dim2: use dev_err_probe() for clock errors in rcar enable functions Batu Ada Tutkun
2026-06-23 12:35 ` [PATCH v2] " Batu Ada Tutkun
2026-06-24 6:22 ` Dan Carpenter
2026-06-23 13:16 ` [PATCH] " Dan Carpenter
2026-06-23 17:41 ` Batu Ada Tutkun
2026-06-23 18:35 ` Dan Carpenter [this message]
2026-06-23 19:46 ` [PATCH v2] " Batu Ada Tutkun
2026-06-24 6:27 ` Dan Carpenter
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=ajrSAIQUjTgAtuey@stanley.mountain \
--to=error27@gmail.com \
--cc=batuadatutkun@gmail.com \
--cc=christian.gromm@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=parthiban.veerasooran@microchip.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.