[PATCH 1/2] nvme-pci: Print error message on failure in nvme_probe

Gerd Bayer gbayer at linux.ibm.com
Wed Oct 22 01:20:41 PDT 2025


On Wed, 2025-10-22 at 09:48 +0200, Greg Kroah-Hartman wrote:
> On Wed, Oct 22, 2025 at 08:26:34AM +0200, Christoph Hellwig wrote:
> > On Mon, Oct 20, 2025 at 05:29:07PM +0200, Gerd Bayer wrote:
> > > Add a new error message like
> > > nvme nvme0: probe failed on 2004:00:00.0 (result: -19)
> > > that makes failures to probe visible in the kernel log.
> > 
> > Is that really a thing drivers are expected to do?  If it is generally
> > usefull I'd expect it to be in the driver core.
> 
> We have that already, dev_err_probe(), no need to create
> yet-another-version of that.

So I take this as an implict answer to the question, if drivers are
expected to do this or the driver core: Drivers.


Before learning about dev_err_probe() I was sampling a few drivers'
probe functions and got inconclusive results regarding their verbosity
regarding logging errors in probe. Interestingly, none of my samples
used dev_err_probe()...

While for most drivers it may be obvious that in most sytem
configurations it will not go unnoticed that e.g. the graphics
controller failed to probe - there may be other
components/configurations and a centralized error reporting e.g. in
local_pci_probe() would have its benefits. But then with so many
drivers already using dev_err_probe(), we don't want to report this
twice, now.

Thus, I'm going to convert my patch over for a v2.

Thanks,
Gerd



More information about the Linux-nvme mailing list