aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-01-01 18:26:24 +0100
committerTakashi Iwai <tiwai@suse.de>2021-01-01 18:26:42 +0100
commitaadee28a909672942f0ae5c1706cfc95f0f93615 (patch)
tree40fdde73f847a27f0a96bcf54e0d0c6ffd45d61b
parenta51a2b1479e67cba4cf990ad31e71b883fae1390 (diff)
downloadhda-emu-aadee28a909672942f0ae5c1706cfc95f0f93615.tar.gz
Add DIV_ROUND_UP() and roundup() wrappers
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--include/wrapper.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/wrapper.h b/include/wrapper.h
index 2282455..579664d 100644
--- a/include/wrapper.h
+++ b/include/wrapper.h
@@ -358,4 +358,7 @@ struct completion {
int dummy;
};
+#define DIV_ROUND_UP(a, b) (((a) + (b) - 1) / (b))
+#define roundup(a, b) (DIV_ROUND_UP(a, b) * (b))
+
#endif /* __HDA_WRAPPER_H */