From 4afc7c37acec4bd783b4b2ceeccc5575c639b4e1 Mon Sep 17 00:00:00 2001 From: Sandeep Puligilla Date: Tue, 12 Apr 2016 15:58:35 +0530 Subject: [PATCH] qcacmn: Add qdf roundup macro Add qdf utility macro to roundup the input value Change-Id: Ic1a7ee0d3a35090b3d0f24858ba8003eee86b057 CRs-Fixed: 947086 --- qdf/inc/qdf_util.h | 8 ++++++++ qdf/linux/src/i_qdf_util.h | 1 + 2 files changed, 9 insertions(+) diff --git a/qdf/inc/qdf_util.h b/qdf/inc/qdf_util.h index defd94c143..a9ea54e5c4 100644 --- a/qdf/inc/qdf_util.h +++ b/qdf/inc/qdf_util.h @@ -112,6 +112,14 @@ static inline int qdf_status_to_os_return(QDF_STATUS status) */ #define QDF_IS_PWR2(value) (((value) ^ ((value)-1)) == ((value) << 1) - 1) +/** + * qdf_roundup() - roundup the input value + * @x: value to roundup + * @y: input value rounded to multiple of this + * + * Return: rounded value + */ +#define qdf_roundup(x, y) __qdf_roundup(x, y) /** * qdf_is_macaddr_equal() - compare two QDF MacAddress diff --git a/qdf/linux/src/i_qdf_util.h b/qdf/linux/src/i_qdf_util.h index 94aa20c94a..c812bab378 100644 --- a/qdf/linux/src/i_qdf_util.h +++ b/qdf/linux/src/i_qdf_util.h @@ -236,4 +236,5 @@ static inline bool __qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1, #define __qdf_rmb() rmb() #define __qdf_mb() mb() +#define __qdf_roundup(x, y) roundup(x, y) #endif /*_I_QDF_UTIL_H*/