Re: [Cocci] [PATCH v3] coccinelle: semantic patch to check for inappropriate do_div() calls

2020-01-11 Thread Julia Lawall
On Fri, 10 Jan 2020, Wen Yang wrote: > do_div() does a 64-by-32 division. > When the divisor is unsigned long, u64, or s64, > do_div() truncates it to 32 bits, this means it > can test non-zero and be truncated to zero for division. > This semantic patch is inspired by Mateusz Guzik's patch: >

Re: [Cocci] [2/2] tests: Add test case for user comments attached to identifiers

2020-01-11 Thread Markus Elfring
> +@ script:python r1 @ > +id; > +@@ > +coccinelle.id = "id/* user comment */" I am still looking for further clarification around this programming interface. See also topics like the following: * Propagating values back from Python script to SmPL rule with other metavariable type than

Re: [Cocci] [v3] coccinelle: semantic patch to check for inappropriate do_div() calls

2020-01-11 Thread Markus Elfring
>> Can the avoidance of duplicate source code (according to SmPL disjunctions) >> trigger positive effects on run time characteristics and software >> maintenance? > > Markus. Please stop asking this question. This will not happen for a while. > You are bothering people with this advice, I