summaryrefslogtreecommitdiff
path: root/scripts/coccinelle/round.cocci
blob: ed06773289d0fb2aa06cb2314f3f3c8977575b7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Use macro DIV_ROUND_UP instead of (((n) + (d) - 1) /(d))
@@
expression e1;
expression e2;
@@
(
- ((e1) + e2 - 1) / (e2)
+ DIV_ROUND_UP(e1,e2)
|
- ((e1) + (e2 - 1)) / (e2)
+ DIV_ROUND_UP(e1,e2)
)

@@
expression e1;
expression e2;
@@
-(DIV_ROUND_UP(e1,e2))
+DIV_ROUND_UP(e1,e2)