Parcourir la source

Add Coccinelle patch for detecing places where CEIL_DIV should be used.

Alexander Færøy il y a 7 ans
Parent
commit
25eaf77033
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      scripts/coccinelle/ceil_div.cocci

+ 6 - 0
scripts/coccinelle/ceil_div.cocci

@@ -0,0 +1,6 @@
+@@
+expression n, d;
+@@
+
+- (((n) + (d) - 1) / (d))
++ CEIL_DIV(n, d)