diff options
author | Andy Shevchenko <[email protected]> | 2024-04-23 17:20:24 +0300 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-05-05 17:53:44 -0700 |
commit | ccde70f4d4baea4d2ebc3d646a0a4ab4cfdf683c (patch) | |
tree | f7a5a17b2782cf3801f38aaedd4f75c38a6e0777 | |
parent | 91882c1617c15eb2a4e996b0822e0b9cbd854dea (diff) |
xarray: use BITS_PER_LONGS()
Patch series "xarray: Clean up xarray.h".
Main portion of this change is to get rid of kernel.h included into other
globally available headers. This decreases a dependency hell degree. The
first patch makes it possible to avoid math.h to be included as bitops.h
is implied by bitmap.h.
This patch (of 2):
Use BITS_PER_LONGS() instead of open coded variant.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | include/linux/xarray.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/xarray.h b/include/linux/xarray.h index d9d479334c9e..d54a1e98b0ca 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h @@ -1146,7 +1146,7 @@ static inline void xa_release(struct xarray *xa, unsigned long index) #define XA_CHUNK_SIZE (1UL << XA_CHUNK_SHIFT) #define XA_CHUNK_MASK (XA_CHUNK_SIZE - 1) #define XA_MAX_MARKS 3 -#define XA_MARK_LONGS DIV_ROUND_UP(XA_CHUNK_SIZE, BITS_PER_LONG) +#define XA_MARK_LONGS BITS_TO_LONGS(XA_CHUNK_SIZE) /* * @count is the count of every non-NULL element in the ->slots array |