From 25eaf77033cd4cc6a5241554be8951a022dd54bd Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Mon, 5 Jun 2017 14:45:53 +0000 Subject: Add Coccinelle patch for detecing places where CEIL_DIV should be used. --- scripts/coccinelle/ceil_div.cocci | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 scripts/coccinelle/ceil_div.cocci (limited to 'scripts') diff --git a/scripts/coccinelle/ceil_div.cocci b/scripts/coccinelle/ceil_div.cocci new file mode 100644 index 0000000000..00843e82c3 --- /dev/null +++ b/scripts/coccinelle/ceil_div.cocci @@ -0,0 +1,6 @@ +@@ +expression n, d; +@@ + +- (((n) + (d) - 1) / (d)) ++ CEIL_DIV(n, d) -- cgit v1.2.3-54-g00ecf