* [PATCH v1 0/2] xarray: Clean up xarray.h
@ 2024-04-23 14:20 Andy Shevchenko
2024-04-23 14:20 ` [PATCH v1 1/2] xarray: Use BITS_PER_LONGS() Andy Shevchenko
2024-04-23 14:20 ` [PATCH v1 2/2] xarray: Don't use "proxy" headers Andy Shevchenko
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-04-23 14:20 UTC (permalink / raw)
To: Andy Shevchenko, linux-fsdevel, linux-kernel
Cc: Matthew Wilcox, Rasmus Villemoes, Andrew Morton
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.
Andy Shevchenko (2):
xarray: Use BITS_PER_LONGS()
xarray: Don't use "proxy" headers
include/linux/xarray.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v1 1/2] xarray: Use BITS_PER_LONGS()
2024-04-23 14:20 [PATCH v1 0/2] xarray: Clean up xarray.h Andy Shevchenko
@ 2024-04-23 14:20 ` Andy Shevchenko
2024-04-23 14:20 ` [PATCH v1 2/2] xarray: Don't use "proxy" headers Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-04-23 14:20 UTC (permalink / raw)
To: Andy Shevchenko, linux-fsdevel, linux-kernel
Cc: Matthew Wilcox, Rasmus Villemoes, Andrew Morton
Use BITS_PER_LONGS() instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/xarray.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v1 2/2] xarray: Don't use "proxy" headers
2024-04-23 14:20 [PATCH v1 0/2] xarray: Clean up xarray.h Andy Shevchenko
2024-04-23 14:20 ` [PATCH v1 1/2] xarray: Use BITS_PER_LONGS() Andy Shevchenko
@ 2024-04-23 14:20 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-04-23 14:20 UTC (permalink / raw)
To: Andy Shevchenko, linux-fsdevel, linux-kernel
Cc: Matthew Wilcox, Rasmus Villemoes, Andrew Morton
Update header inclusions to follow IWYU (Include What You Use)
principle.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/xarray.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/xarray.h b/include/linux/xarray.h
index d54a1e98b0ca..d2e4d3624689 100644
--- a/include/linux/xarray.h
+++ b/include/linux/xarray.h
@@ -12,14 +12,18 @@
#include <linux/bitmap.h>
#include <linux/bug.h>
#include <linux/compiler.h>
+#include <linux/err.h>
#include <linux/gfp.h>
#include <linux/kconfig.h>
-#include <linux/kernel.h>
+#include <linux/limits.h>
+#include <linux/lockdep.h>
#include <linux/rcupdate.h>
#include <linux/sched/mm.h>
#include <linux/spinlock.h>
#include <linux/types.h>
+struct list_lru;
+
/*
* The bottom two bits of the entry determine how the XArray interprets
* the contents:
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-23 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23 14:20 [PATCH v1 0/2] xarray: Clean up xarray.h Andy Shevchenko
2024-04-23 14:20 ` [PATCH v1 1/2] xarray: Use BITS_PER_LONGS() Andy Shevchenko
2024-04-23 14:20 ` [PATCH v1 2/2] xarray: Don't use "proxy" headers Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).