mbox series

[-next,0/2] coccinelle: Add rules to find str_true_false/str_false_true replacements

Message ID 20240829112455.232263-1-lihongbo22@huawei.com (mailing list archive)
Headers show
Series coccinelle: Add rules to find str_true_false/str_false_true replacements | expand

Message

Hongbo Li Aug. 29, 2024, 11:24 a.m. UTC
After str_true_false()/str_false_true() has been introduced
in the tree, we can add rules for finding places where
str_true_false()/str_false_true() can be used.

Hongbo Li (2):
  coccinelle: Add rules to find str_true_false() replacements
  coccinelle: Add rules to find str_false_true() replacements

 scripts/coccinelle/api/string_choices.cocci | 46 +++++++++++++++++++++
 1 file changed, 46 insertions(+)

Comments

Hongbo Li Sept. 4, 2024, 2:36 a.m. UTC | #1
On 2024/8/29 19:24, Hongbo Li wrote:
> After str_true_false()/str_false_true() has been introduced
> in the tree, we can add rules for finding places where
> str_true_false()/str_false_true() can be used.
> 
> Hongbo Li (2):
>    coccinelle: Add rules to find str_true_false() replacements
>    coccinelle: Add rules to find str_false_true() replacements
> 

I found that there are still a few function rules that are not complete, 
such as str_on_off, str_enable_disable, str_yes_no. How about adding 
these rules as well?

Thanks,
Hongbo

>   scripts/coccinelle/api/string_choices.cocci | 46 +++++++++++++++++++++
>   1 file changed, 46 insertions(+)
>
Andy Shevchenko Sept. 4, 2024, 7:37 a.m. UTC | #2
On Wed, Sep 4, 2024 at 5:36 AM Hongbo Li <lihongbo22@huawei.com> wrote:
> On 2024/8/29 19:24, Hongbo Li wrote:

...

> I found that there are still a few function rules that are not complete,
> such as str_on_off, str_enable_disable, str_yes_no. How about adding
> these rules as well?

Why not?
Hongbo Li Sept. 4, 2024, 7:42 a.m. UTC | #3
On 2024/9/4 15:37, Andy Shevchenko wrote:
> On Wed, Sep 4, 2024 at 5:36 AM Hongbo Li <lihongbo22@huawei.com> wrote:
>> On 2024/8/29 19:24, Hongbo Li wrote:
> 
> ...
> 
>> I found that there are still a few function rules that are not complete,
>> such as str_on_off, str_enable_disable, str_yes_no. How about adding
>> these rules as well?
> 
> Why not?
> 
Fine. I'll add these rules in v2

Thanks,
Hongbo