* [PATCH v1 1/1] rbtree: Replace kernel.h with the necessary inclusions
@ 2022-06-03 17:10 Andy Shevchenko
2022-06-03 17:15 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2022-06-03 17:10 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, linux-kernel; +Cc: Andrew Morton, Andy Shevchenko
When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.
Replace kernel.h inclusion with the list of what is really being used.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/rbtree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
index 235047d7a1b5..f7edca369eda 100644
--- a/include/linux/rbtree.h
+++ b/include/linux/rbtree.h
@@ -17,9 +17,9 @@
#ifndef _LINUX_RBTREE_H
#define _LINUX_RBTREE_H
+#include <linux/container_of.h>
#include <linux/rbtree_types.h>
-#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/rcupdate.h>
--
2.35.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] rbtree: Replace kernel.h with the necessary inclusions
2022-06-03 17:10 [PATCH v1 1/1] rbtree: Replace kernel.h with the necessary inclusions Andy Shevchenko
@ 2022-06-03 17:15 ` Andrew Morton
2022-06-03 19:26 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2022-06-03 17:15 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Sebastian Andrzej Siewior, linux-kernel
On Fri, 3 Jun 2022 20:10:12 +0300 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> When kernel.h is used in the headers it adds a lot into dependency hell,
> especially when there are circular dependencies are involved.
>
> Replace kernel.h inclusion with the list of what is really being used.
There are surely thousands of files we could do this with. Is this the
start of a lifelong project, or is there something special about
rbtree.h?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] rbtree: Replace kernel.h with the necessary inclusions
2022-06-03 17:15 ` Andrew Morton
@ 2022-06-03 19:26 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-06-03 19:26 UTC (permalink / raw)
To: Andrew Morton
Cc: Andy Shevchenko, Sebastian Andrzej Siewior, Linux Kernel Mailing List
On Fri, Jun 3, 2022 at 9:16 PM Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 3 Jun 2022 20:10:12 +0300 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> > When kernel.h is used in the headers it adds a lot into dependency hell,
> > especially when there are circular dependencies are involved.
> >
> > Replace kernel.h inclusion with the list of what is really being used.
>
> There are surely thousands of files we could do this with.
Yes, but the idea is to touch only (global / generic) headers to clean
up them from kernel.h.
> Is this the
> start of a lifelong project,
Continuation of something which annoys me for a long time. We have not
so many, btw, files that are generic and include kernel.h in the
include/*.
> or is there something special about
> rbtree.h?
Nothing except that header being included in many other modules.
I believe this work goes in conjunction with Ingo's huge clean up
series. Not sure where it's now.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-03 19:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 17:10 [PATCH v1 1/1] rbtree: Replace kernel.h with the necessary inclusions Andy Shevchenko
2022-06-03 17:15 ` Andrew Morton
2022-06-03 19:26 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®