* [PATCH v1 1/1] percpu_ref: Replace kernel.h with the necessary inclusions
@ 2021-12-09 12:30 Andy Shevchenko
2021-12-09 20:40 ` Dennis Zhou
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-12-09 12:30 UTC (permalink / raw)
To: Pavel Begunkov, linux-mm, linux-kernel
Cc: Dennis Zhou, Tejun Heo, Christoph Lameter, 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/percpu-refcount.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h
index b31d3f3312ce..d73a1c08c3e3 100644
--- a/include/linux/percpu-refcount.h
+++ b/include/linux/percpu-refcount.h
@@ -51,9 +51,9 @@
#define _LINUX_PERCPU_REFCOUNT_H
#include <linux/atomic.h>
-#include <linux/kernel.h>
#include <linux/percpu.h>
#include <linux/rcupdate.h>
+#include <linux/types.h>
#include <linux/gfp.h>
struct percpu_ref;
--
2.33.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] percpu_ref: Replace kernel.h with the necessary inclusions
2021-12-09 12:30 [PATCH v1 1/1] percpu_ref: Replace kernel.h with the necessary inclusions Andy Shevchenko
@ 2021-12-09 20:40 ` Dennis Zhou
0 siblings, 0 replies; 2+ messages in thread
From: Dennis Zhou @ 2021-12-09 20:40 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Pavel Begunkov, linux-mm, linux-kernel, Dennis Zhou, Tejun Heo,
Christoph Lameter
Hello,
On Thu, Dec 09, 2021 at 02:30:33PM +0200, Andy Shevchenko 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.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> include/linux/percpu-refcount.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h
> index b31d3f3312ce..d73a1c08c3e3 100644
> --- a/include/linux/percpu-refcount.h
> +++ b/include/linux/percpu-refcount.h
> @@ -51,9 +51,9 @@
> #define _LINUX_PERCPU_REFCOUNT_H
>
> #include <linux/atomic.h>
> -#include <linux/kernel.h>
> #include <linux/percpu.h>
> #include <linux/rcupdate.h>
> +#include <linux/types.h>
> #include <linux/gfp.h>
>
> struct percpu_ref;
> --
> 2.33.0
>
Applied to for-5.16-fixes.
Thanks,
Dennis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-09 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 12:30 [PATCH v1 1/1] percpu_ref: Replace kernel.h with the necessary inclusions Andy Shevchenko
2021-12-09 20:40 ` Dennis Zhou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox