Re: [v3] coccinelle: semantic patch to check for inappropriate do_div() calls
From: Markus Elfring
Date: Sat Jan 11 2020 - 02:30:58 EST
>> * I suggest once more to adjust the dependency specifications for the usage
>> Â of these functions by SmPL rules.
>
> Most of the functions here are for all operation modes.
I got an other understanding for this software.
You added the information âalso filter out safe consts for context modeâ
to the patch change log.
>> * Can the local variable âmsgâ be omitted?
I would appreciate another fine-tuning also at this place.
>>> +coccilib.org.print_todo(p[0], construct_warnings("div64_ul"))
>>
>> I suggest again to move the prefix âdiv64_â into the string literal
>> of the function implementation.
>
> âdiv64_ulâ indicates the function name we recommend.
The intention can be fine.
> If we delete the prefix "div64_",
I suggest to use the text at an other place.
> it may reduce readability.
I find an other code variant also readable good enough.
> +*do_div(f, \( l \| ul \| ul64 \| sl64 \) );
>
> We agree with Julia:
> I don't se any point to this.
Can the avoidance of duplicate source code (according to SmPL disjunctions)
trigger positive effects on run time characteristics and software maintenance?
Regards,
Markus