From: Frank Li <Frank.li@nxp.com>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: peng.fan@nxp.com, andersson@kernel.org,
mathieu.poirier@linaro.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com,
linux-remoteproc@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] remoteproc: imx_rproc: Check return value of regmap_attach_dev() in imx_rproc_mmio_detect_mode()
Date: Tue, 10 Feb 2026 10:38:58 -0500 [thread overview]
Message-ID: <aYtREmdWHf9BdN0w@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260210050744.1902425-1-nichen@iscas.ac.cn>
On Tue, Feb 10, 2026 at 01:07:44PM +0800, Chen Ni wrote:
> On Mon, Feb 09, 2026 at 11:36:51AM -0500, Frank Li wrote:
> > On Mon, Feb 09, 2026 at 01:14:07PM +0800, Chen Ni wrote:
> > > Changes in v2:
> > > - Use dev_err() + return ret instead of dev_err_probe()
> >
> > why?
> >
> > Frank
>
> Hi Frank,
>
> The replacement of dev_err_probe() with dev_err() + return ret is based
> on two key reasons:
>
> 1. Consistency with existing code style in imx_rproc_mmio_detect_mode():
> The upper-level probe function already uses dev_err_probe() to handle
> errors from this function, and all other error paths here also use
> "dev_err() + return ret", so this change aligns with the existing
> coding style.
You should update existing code to use dev_err_probe()
>
> 2. Technical rationale from community feedback:
> regmap_attach_dev() only returns -ENOMEM errors, and dev_err_probe() is
> silent for -ENOMEM errors [1]. Using dev_err() ensures the error is
> logged clearly, while returning the original ret maintains proper error
> propagation.
>
> [1] 2f3cfd2f4b7c ("driver core: Make dev_err_probe() silent for -ENOMEM")
>
That means you needn't error message. just "return ret" is enough.
Frank
> Best regards,
> Chen Ni
>
next prev parent reply other threads:[~2026-02-10 15:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 5:14 [PATCH v2] remoteproc: imx_rproc: Check return value of regmap_attach_dev() in imx_rproc_mmio_detect_mode() Chen Ni
2026-02-09 16:36 ` Frank Li
2026-02-10 5:07 ` Chen Ni
2026-02-10 15:38 ` Frank Li [this message]
2026-02-10 22:02 ` Mathieu Poirier
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=aYtREmdWHf9BdN0w@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=andersson@kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=nichen@iscas.ac.cn \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
/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