Re: [PATCH RFC v2 2/2] driver core: Don't allow passing a -ENOMEM to dev_err_probe()

From: Geert Uytterhoeven
Date: Fri Jun 14 2024 - 08:10:26 EST


Hi Uwe,

On Fri, Jun 14, 2024 at 11:15 AM Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxx> wrote:
> On Fri, Jun 14, 2024 at 09:26:52AM +0200, Geert Uytterhoeven wrote:
> > Looks like dev_err_probe() does not have a dummy for the !CONFIG_PRINTK
> > case yet, while it could definitely use one.
>
> Would you want to drop
>
> device_set_deferred_probe_reason(dev, &vaf);
>
> from dev_err_probe() for !CONFIG_PRINTK, too? If not, you can throw away
> the string only if __builtin_constant_p(__err != -EPROBE_DEFER) && __err
> != -EPROBE_DEFER. I agree such an improvement would be nice, but that's
> orthogonal to this series.

I would drop it. CONFIG_PRINTK=n is only intended for production
systems where no console is available, and the full behavior of the system
is understood well.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds