[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260210050744.1902425-1-nichen@iscas.ac.cn>
Date: Tue, 10 Feb 2026 13:07:44 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: Frank.li@....com
Cc: peng.fan@....com,
andersson@...nel.org,
mathieu.poirier@...aro.org,
s.hauer@...gutronix.de,
kernel@...gutronix.de,
festevam@...il.com,
linux-remoteproc@...r.kernel.org,
imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] remoteproc: imx_rproc: Check return value of regmap_attach_dev() in imx_rproc_mmio_detect_mode()
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.
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")
Best regards,
Chen Ni
Powered by blists - more mailing lists