Dear Elena,

I have also taken another look at your script.

The SmPL rule “r1” specifies six metavariables for identifiers. It seems that
the names “fname3” till “fname6” do not care for different function parameters
in the SmPL disjunction at the end.
How do you think about to reduce this disjunction by using a regular expression
with an alternation like “.*(?:call_rcu|del|queue_work|schedule_work).*”
for a constraint?

Will it help to refactor another rule a bit?

@r3 exists@
identifier x;
position p1;
 x =
 atomic_add_return at p1(-1, ...);
 atomic_long_add_return at p1(-1, ...);
 atomic64_add_return at p1(-1, ...);

Cocci mailing list

Reply via email to