mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
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/20240423142204.2408923-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
91882c1617
commit
ccde70f4d4
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue