Re: [PATCH] pinctrl: rp1: silence uninitialized variable warning
From: Dan Carpenter
Date: Tue Jul 01 2025 - 15:04:39 EST
On Tue, Jul 01, 2025 at 11:30:01AM +0200, Andrea della Porta wrote:
> We really can't get rid of that warning by replacing ENOTSUPP with
> EOPNOTSUPP because the core pinctrl code still rely on the 'wrong'
> define
Ah good. Thanks for the explanation. I'm glad I didn't try "fix" it
then. :)
> like this excerpt from drivers/pinctrl/pinconf-generic.c:
>
> ...
> if (gname)
> ret = pin_config_group_get(dev_name(pctldev->dev),
> gname, &config);
> else
> ret = pin_config_get_for_pin(pctldev, pin, &config);
> /* These are legal errors */
> if (ret == -EINVAL || ret == -ENOTSUPP)
> continue;
> ...
>
> Also, many drivers still rely on ENOTSUPP. Maybe a patch that will
> fix all of them at once (drivers and core code) is in order, I have
> it in my todo list, indeed.
> Besides that,
>
> Reviewed-by: Andrea della Porta <andrea.porta@xxxxxxxx>
Thanks!
regards,
dan carpenter