Re: [PATCH] coccinelle: Add str_off_on() and str_no_yes() rules

From: Andy Shevchenko
Date: Sun Oct 27 2024 - 14:57:31 EST


On Sun, Oct 27, 2024 at 5:25 PM Julia Lawall <julia.lawall@xxxxxxxx> wrote:
> On Sun, 27 Oct 2024, Andy Shevchenko wrote:
> > On Sun, Oct 27, 2024 at 2:59 PM Thorsten Blum <thorsten.blum@xxxxxxxxx> wrote:
> > >
> > > In addition to str_on_off() and str_yes_no(), add rules to search for
> > > str_off_on() and str_no_yes() replacements.
> >
> > I don't know cocci well enough, but this does simply not scale. We
> > also have cases where "Yes"/"No", "YES"/"NO" and all possible
> > variations of that.
>
> Andy, are you concerned about the number of such functions in the kernel
> or the number of rules in the semantic patch.

Rules for the semantic patches I am worried about.

> There are indeed more
> concise ways to write the semantic patch.

Would be nice to see ways to cover more cases in less lines in the spatch.


--
With Best Regards,
Andy Shevchenko