Thread (48 messages) 48 messages, 6 authors, 2026-01-29

Re: [PATCH v2 net-next 04/15] net: dsa: sja1105: prepare regmap for passing to child devices

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2026-01-22 16:34:31
Also in: linux-devicetree, lkml

On Thu, Jan 22, 2026 at 04:17:59PM +0000, Russell King (Oracle) wrote:
On Thu, Jan 22, 2026 at 04:54:11PM +0200, Andy Shevchenko wrote:
quoted
On Thu, Jan 22, 2026 at 03:42:45PM +0200, Vladimir Oltean wrote:
quoted
I never understood the point of dev_err_probe() when you know the return
code can never be -EPROBE_DEFER.
i) Smaller code; ii) no need to care about: a) deferred probe cases;
b) -ENOMEM cases.  I see only benefits here by using it.
Isn't it also used for /sys/kernel/debug/devices_deferred to report to
the user ?

E.g.

supply-voltage-monitor  iio_hwmon: Failed to get channels

produced by drivers/hwmon/iio_hwmon.c::iio_hwmon_probe():

        channels = devm_iio_channel_get_all(dev);
        if (IS_ERR(channels)) {
                ret = PTR_ERR(channels);
                if (ret == -ENODEV)
                        ret = -EPROBE_DEFER;
                return dev_err_probe(dev, ret,
                                     "Failed to get channels\n");
        }
Yes, that's what I imply by "deferred probe cases".

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help