On 11/14/25 7:03 AM, Alexandre Courbot wrote:
> On Fri Nov 14, 2025 at 11:41 AM JST, John Hubbard wrote:
>> Some places in the driver use ENODEV for unsupported GPUs, while others
>> use ENOTSUPP. ENOTSUPP is more accurate, so change the ENODEV instances
>> to ENOTSUPP.
> 
> Mmm actually I suspect we do want to return `ENODEV` in those cases, for
> the driver core to interpret the error as "I reject this particular
> device":
> 
> https://elixir.bootlin.com/linux/v6.13/source/drivers/base/dd.c#L588
> 

OK, so I guess I'll drop this patch and use ENODEV for this situation,
for now at least.

Later, separately, I might just go on a tiny crusade to improve the
driver base, such as:

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 13ab98e033ea..100fd8886b8d 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -588,6 +588,7 @@ static int call_driver_probe(struct device *dev, const 
struct device_driver *drv
                dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name);
                break;
        case -ENODEV:
+       case -ENOTSUPP:
        case -ENXIO:
                dev_dbg(dev, "probe with driver %s rejects match %d\n",
                        drv->name, ret);


thanks,
-- 
John Hubbard

Reply via email to