Re: [PATCH v1 1/1] checkpatch: Add dev_err_probe() to the list of Log Functions

From: Andy Shevchenko
Date: Fri Dec 01 2023 - 11:18:38 EST


On Fri, Dec 01, 2023 at 08:01:28AM -0800, Guenter Roeck wrote:
> On 12/1/23 07:14, Andy Shevchenko wrote:
> > dev_err_probe() is missing in the list of Log Functions and hence
> > checkpatch issues a warning in the cases when any other function
> > in use won't trigger it. Add dev_err_probe() to the list to behave
> > consistently.

...

> Not sure if I agree. The difference here is that dev_err_probe()
> has two additional parameters ahead of the string. I would very much prefer
> to have those two additional parameters on a separate line if the string is
> too long to fit in 100 columns with those two parameters on the same line.
> In other words, I very much prefer
>
> dev_err_probe(dev, -ESOMETHING,
> "very long string");
> over
> dev_err_probe(dev, -ESOMETHING, "very long string");
>
> and I don't really think that the latter has any benefits.
>
> Also note that other dev_xxx() log functions are not included in the above test
> and would still generate warnings. Accepting
>
> dev_err_probe(dev, -ESOMETHING, "very long string");
> but not
> dev_err(dev, "very long string");

They are included, see the line previous to the added one.
(Regexp covers something like x_y_()* and x_*() families with the explicitly
listed * suffixes.)

That's why _this_ change makes it consistent.

> doesn't really make sense to me.

--
With Best Regards,
Andy Shevchenko