Re: [cocci] [PATCH] Revert "scripts/coccinelle: Find PTR_ERR() to %pe candidates"
Gal Pressman <[email protected]>
| Newsgroups | fr.inria.cocci,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 30/10/2025 16:06, Johan Hovold wrote: > Note that in most cases you have ret variable that holds the errno, > which would not be caught by this cocci script either: > > ret = PTR_ERR(p); > dev_err(dev, "failed to ...: %d\n", ret); > return ret; // or goto out; I have a followup patch that catches these kinds of cases as well. > It still generates noise and extra work for already overworked > maintainers that would need to explain over and over again why they are > rejecting patches that appears to fix "warnings". Some will just take > the patches, which leads to inconsistencies (as only a handful of > printks will be converted) and a push for a style which again only some > people prefer. There's the subsystem maintainer "rules" documentation in Documentation/process/maintainer-*.rst which can document these kinds of stuff. > > So I still think this script should be dropped. And you still need to > review drivers manually if you really want to use %pe consistently (e.g. > for all the cases where there is no error pointer to begin with). I am not sure who is to decide, obviously I prefer not to revert it, but I understand your concerns.