From bd25c57feccb6b6dc19f8c5c4ae60de599a6a736 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 17 Jun 2013 14:10:42 +0200 Subject: [PATCH] backprots: add rounddown Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/kernel.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backport/backport-include/linux/kernel.h b/backport/backport-include/linux/kernel.h index 79ad8896ab74..42aa91ddc79e 100644 --- a/backport/backport-include/linux/kernel.h +++ b/backport/backport-include/linux/kernel.h @@ -271,6 +271,15 @@ int hex_to_bin(char ch); __val > __max ? __max: __val; }) #endif +#ifndef rounddown +#define rounddown(x, y) ( \ +{ \ + typeof(x) __x = (x); \ + __x - (__x % (y)); \ +} \ +) +#endif /* rounddown */ + #endif /* __BACKPORT_KERNEL_H */ /* -- 2.30.2