Re: [PATCH] scripts: coccinelle: check for !(un)?likely usage
From: Denis Efremov
Date: Sun Aug 25 2019 - 17:06:43 EST
On 25.08.2019 18:30, Markus Elfring wrote:
>> +* !likely(E)
>> +* !unlikely(E)
> Can the following code variant be nicer?
> +*! \( likely \| unlikely \) (E)
> I would find the following SmPL change specification more succinct.
>> +coccilib.org.print_todo(p, "WARNING use unlikely instead of !likely")
>> +msg="WARNING: Use unlikely instead of !likely"
>> +coccilib.report.print_report(p, msg)
> 1. I find such a message construction nicer without the extra variable âmsgâ.
> 2. I recommend to make the provided information unique.
> * How do you think about to split the SmPL disjunction in the rule ârâ
> for this purpose?
> * Should the transformation become clearer?
Thank you for the review, I will prepare v2.