On 02/09/2025 17:27, Andy Shevchenko wrote: > On Tue, Sep 02, 2025 at 05:12:24PM +0200, Krzysztof Kozlowski wrote: >> On 02/09/2025 15:15, Andy Shevchenko wrote: >>> On Tue, Sep 02, 2025 at 01:59:21PM +0200, Bartosz Golaszewski wrote: > > ... > >>>> + for (i = 0; i < soc_data->nfunctions; i++) { >>>> + func = &soc_data->functions[i]; >>>> + >>>> + ret = pinmux_generic_add_pinfunction(pctrl->pctrl, func, NULL); >>>> + if (ret < 0) >>> >>> Why not simply >>> >>> if (ret) >> >> Because existing code is as readable? > > I don't agree on this. And Bart explained why. So, it's an API requirement > after all.
If pinmux_generic_add_pinfunction() was returning 0 or error code, which I assume you thought this function is doing, then your suggestion was nitpicking and existing code would be readable. Requesting (ret) for such case is really not helping. If, as it turns out if you looked at the code, pinmux_generic_add_pinfunction() returns non-error for success, your comment was even wrong. So either you are nitpicking which is not helpful or you are finding fake issues which is counter productive. Best regards, Krzysztof