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 <[email protected]>
---
v2: updated Cc list based on previous changes to MAINTAINERS
include/soc/fsl/dpaa2-fd.h | 3 ++-
include/soc/fsl/qe/immap_qe.h | 3 ++-
include/soc/fsl/qe/qe_tdm.h | 4 +++-
include/soc/fsl/qe/ucc_fast.h | 2 +-
include/soc/fsl/qe/ucc_slow.h | 2 +-
5 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/include/soc/fsl/dpaa2-fd.h b/include/soc/fsl/dpaa2-fd.h
index 90ae8d191f1a..bae490cac0aa 100644
--- a/include/soc/fsl/dpaa2-fd.h
+++ b/include/soc/fsl/dpaa2-fd.h
@@ -7,7 +7,8 @@
#ifndef __FSL_DPAA2_FD_H
#define __FSL_DPAA2_FD_H
-#include <linux/kernel.h>
+#include <linux/byteorder/generic.h>
+#include <linux/types.h>
/**
* DOC: DPAA2 FD - Frame Descriptor APIs for DPAA2
diff --git a/include/soc/fsl/qe/immap_qe.h b/include/soc/fsl/qe/immap_qe.h
index 7614fee532f1..edd601f53f5d 100644
--- a/include/soc/fsl/qe/immap_qe.h
+++ b/include/soc/fsl/qe/immap_qe.h
@@ -13,7 +13,8 @@
#define _ASM_POWERPC_IMMAP_QE_H
#ifdef __KERNEL__
-#include <linux/kernel.h>
+#include <linux/types.h>
+
#include <asm/io.h>
#define QE_IMMAP_SIZE (1024 * 1024) /* 1MB from 1MB+IMMR */
diff --git a/include/soc/fsl/qe/qe_tdm.h b/include/soc/fsl/qe/qe_tdm.h
index b6febe225071..43ea830cfe1f 100644
--- a/include/soc/fsl/qe/qe_tdm.h
+++ b/include/soc/fsl/qe/qe_tdm.h
@@ -10,8 +10,8 @@
#ifndef _QE_TDM_H_
#define _QE_TDM_H_
-#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/types.h>
#include <soc/fsl/qe/immap_qe.h>
#include <soc/fsl/qe/qe.h>
@@ -19,6 +19,8 @@
#include <soc/fsl/qe/ucc.h>
#include <soc/fsl/qe/ucc_fast.h>
+struct device_node;
+
/* SI RAM entries */
#define SIR_LAST 0x0001
#define SIR_BYTE 0x0002
diff --git a/include/soc/fsl/qe/ucc_fast.h b/include/soc/fsl/qe/ucc_fast.h
index 9696a5b9b5d1..ad60b87a3c69 100644
--- a/include/soc/fsl/qe/ucc_fast.h
+++ b/include/soc/fsl/qe/ucc_fast.h
@@ -10,7 +10,7 @@
#ifndef __UCC_FAST_H__
#define __UCC_FAST_H__
-#include <linux/kernel.h>
+#include <linux/types.h>
#include <soc/fsl/qe/immap_qe.h>
#include <soc/fsl/qe/qe.h>
diff --git a/include/soc/fsl/qe/ucc_slow.h b/include/soc/fsl/qe/ucc_slow.h
index 11a216e4e919..7548ce8a202d 100644
--- a/include/soc/fsl/qe/ucc_slow.h
+++ b/include/soc/fsl/qe/ucc_slow.h
@@ -11,7 +11,7 @@
#ifndef __UCC_SLOW_H__
#define __UCC_SLOW_H__
-#include <linux/kernel.h>
+#include <linux/types.h>
#include <soc/fsl/qe/immap_qe.h>
#include <soc/fsl/qe/qe.h>
--
2.33.0
On Wed, Nov 10, 2021 at 12:59:52PM +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 <[email protected]>
> ---
> v2: updated Cc list based on previous changes to MAINTAINERS
Any comments on this, please?
I really want to decrease amount of kernel.h usage in the common headers.
So others won't copy'n'paste bad example.
--
With Best Regards,
Andy Shevchenko
> -----Original Message-----
> From: Andy Shevchenko <[email protected]>
> Sent: Monday, November 15, 2021 5:30 AM
> To: [email protected]; [email protected]; linux-arm-
> [email protected]
> Cc: Leo Li <[email protected]>; Qiang Zhao <[email protected]>
> Subject: Re: [PATCH v2 3/3] soc: fsl: Replace kernel.h with the necessary
> inclusions
>
> On Wed, Nov 10, 2021 at 12:59:52PM +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 <[email protected]>
> > ---
> > v2: updated Cc list based on previous changes to MAINTAINERS
>
> Any comments on this, please?
>
> I really want to decrease amount of kernel.h usage in the common headers.
> So others won't copy'n'paste bad example.
There seems to be no problem with the patch although I didn't get time to really compile with it applied.
Will pick them up later after build test.
Regards,
Leo
On Mon, Nov 15, 2021 at 10:24:36PM +0000, Leo Li wrote:
> > From: Andy Shevchenko <[email protected]>
> > Sent: Monday, November 15, 2021 5:30 AM
> > On Wed, Nov 10, 2021 at 12:59:52PM +0200, Andy Shevchenko wrote:
...
> > > v2: updated Cc list based on previous changes to MAINTAINERS
> >
> > Any comments on this, please?
> >
> > I really want to decrease amount of kernel.h usage in the common headers.
> > So others won't copy'n'paste bad example.
>
> There seems to be no problem with the patch although I didn't get time to really compile with it applied.
>
> Will pick them up later after build test.
Thank you!
Note, it has two fixes against MAINTAINERS which may be sent, I believe,
sooner than later to Linus.
--
With Best Regards,
Andy Shevchenko
On Tue, Nov 16, 2021 at 11:38:01AM +0200, Andy Shevchenko wrote:
> On Mon, Nov 15, 2021 at 10:24:36PM +0000, Leo Li wrote:
> > > From: Andy Shevchenko <[email protected]>
> > > Sent: Monday, November 15, 2021 5:30 AM
> > > On Wed, Nov 10, 2021 at 12:59:52PM +0200, Andy Shevchenko wrote:
>
> ...
>
> > > > v2: updated Cc list based on previous changes to MAINTAINERS
> > >
> > > Any comments on this, please?
> > >
> > > I really want to decrease amount of kernel.h usage in the common headers.
> > > So others won't copy'n'paste bad example.
> >
> > There seems to be no problem with the patch although I didn't get time to really compile with it applied.
> >
> > Will pick them up later after build test.
>
> Thank you!
>
> Note, it has two fixes against MAINTAINERS which may be sent, I believe,
> sooner than later to Linus.
Any new so far?
--
With Best Regards,
Andy Shevchenko
On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko
<[email protected]> wrote:
>
> On Tue, Nov 16, 2021 at 11:38:01AM +0200, Andy Shevchenko wrote:
> > On Mon, Nov 15, 2021 at 10:24:36PM +0000, Leo Li wrote:
> > > > From: Andy Shevchenko <[email protected]>
> > > > Sent: Monday, November 15, 2021 5:30 AM
> > > > On Wed, Nov 10, 2021 at 12:59:52PM +0200, Andy Shevchenko wrote:
> >
> > ...
> >
> > > > > v2: updated Cc list based on previous changes to MAINTAINERS
> > > >
> > > > Any comments on this, please?
> > > >
> > > > I really want to decrease amount of kernel.h usage in the common headers.
> > > > So others won't copy'n'paste bad example.
> > >
> > > There seems to be no problem with the patch although I didn't get time to really compile with it applied.
> > >
> > > Will pick them up later after build test.
> >
> > Thank you!
> >
> > Note, it has two fixes against MAINTAINERS which may be sent, I believe,
> > sooner than later to Linus.
>
> Any new so far?
The build test is good. I have applied it for next. Thanks.
Regards,
Leo
On Wed, Dec 01, 2021 at 01:41:16PM -0600, Li Yang wrote:
> On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko
> <[email protected]> wrote:
> >
> > On Tue, Nov 16, 2021 at 11:38:01AM +0200, Andy Shevchenko wrote:
> > > On Mon, Nov 15, 2021 at 10:24:36PM +0000, Leo Li wrote:
> > > > > From: Andy Shevchenko <[email protected]>
> > > > > Sent: Monday, November 15, 2021 5:30 AM
> > > > > On Wed, Nov 10, 2021 at 12:59:52PM +0200, Andy Shevchenko wrote:
> > >
> > > ...
> > >
> > > > > > v2: updated Cc list based on previous changes to MAINTAINERS
> > > > >
> > > > > Any comments on this, please?
> > > > >
> > > > > I really want to decrease amount of kernel.h usage in the common headers.
> > > > > So others won't copy'n'paste bad example.
> > > >
> > > > There seems to be no problem with the patch although I didn't get time to really compile with it applied.
> > > >
> > > > Will pick them up later after build test.
> > >
> > > Thank you!
> > >
> > > Note, it has two fixes against MAINTAINERS which may be sent, I believe,
> > > sooner than later to Linus.
> >
> > Any new so far?
>
> The build test is good. I have applied it for next. Thanks.
Thanks, what about MAINTAINERS updates? I don't see them neither in next nor in
your tree.
--
With Best Regards,
Andy Shevchenko
> -----Original Message-----
> From: Andy Shevchenko <[email protected]>
> Sent: Thursday, December 2, 2021 3:33 AM
> To: Leo Li <[email protected]>
> Cc: [email protected]; [email protected]; linux-arm-
> [email protected]; Qiang Zhao <[email protected]>
> Subject: Re: [PATCH v2 3/3] soc: fsl: Replace kernel.h with the necessary
> inclusions
>
> On Wed, Dec 01, 2021 at 01:41:16PM -0600, Li Yang wrote:
> > On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko
> > <[email protected]> wrote:
> > >
> > > On Tue, Nov 16, 2021 at 11:38:01AM +0200, Andy Shevchenko wrote:
> > > > On Mon, Nov 15, 2021 at 10:24:36PM +0000, Leo Li wrote:
> > > > > > From: Andy Shevchenko <[email protected]>
> > > > > > Sent: Monday, November 15, 2021 5:30 AM On Wed, Nov 10, 2021
> > > > > > at 12:59:52PM +0200, Andy Shevchenko wrote:
> > > >
> > > > ...
> > > >
> > > > > > > v2: updated Cc list based on previous changes to MAINTAINERS
> > > > > >
> > > > > > Any comments on this, please?
> > > > > >
> > > > > > I really want to decrease amount of kernel.h usage in the common
> headers.
> > > > > > So others won't copy'n'paste bad example.
> > > > >
> > > > > There seems to be no problem with the patch although I didn't get
> time to really compile with it applied.
> > > > >
> > > > > Will pick them up later after build test.
> > > >
> > > > Thank you!
> > > >
> > > > Note, it has two fixes against MAINTAINERS which may be sent, I
> > > > believe, sooner than later to Linus.
> > >
> > > Any new so far?
> >
> > The build test is good. I have applied it for next. Thanks.
>
> Thanks, what about MAINTAINERS updates? I don't see them neither in next
> nor in your tree.
I am ok with these MAINTAINERS updates. I thought you want to send them directly to Linus. I can take them if you like.
Regards,
Leo
On Thu, Dec 02, 2021 at 08:01:54PM +0000, Leo Li wrote:
> > From: Andy Shevchenko <[email protected]>
> > Sent: Thursday, December 2, 2021 3:33 AM
> > On Wed, Dec 01, 2021 at 01:41:16PM -0600, Li Yang wrote:
> > > On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko
> > > <[email protected]> wrote:
...
> > > The build test is good. I have applied it for next. Thanks.
> >
> > Thanks, what about MAINTAINERS updates? I don't see them neither in next
> > nor in your tree.
>
> I am ok with these MAINTAINERS updates. I thought you want to send them directly to Linus. I can take them if you like.
I was just pointing out that it would be good that you (as a maintainer of SOC
FSL) have them applied and pushed for the current cycle, but they are not code
fixes anyway, so it's not critical.
TL;DR: Yes, please take them, thanks!
--
With Best Regards,
Andy Shevchenko
On Thu, Dec 2, 2021 at 3:30 PM Andy Shevchenko
<[email protected]> wrote:
>
> On Thu, Dec 02, 2021 at 08:01:54PM +0000, Leo Li wrote:
> > > From: Andy Shevchenko <[email protected]>
> > > Sent: Thursday, December 2, 2021 3:33 AM
> > > On Wed, Dec 01, 2021 at 01:41:16PM -0600, Li Yang wrote:
> > > > On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko
> > > > <[email protected]> wrote:
>
> ...
>
> > > > The build test is good. I have applied it for next. Thanks.
> > >
> > > Thanks, what about MAINTAINERS updates? I don't see them neither in next
> > > nor in your tree.
> >
> > I am ok with these MAINTAINERS updates. I thought you want to send them directly to Linus. I can take them if you like.
>
> I was just pointing out that it would be good that you (as a maintainer of SOC
> FSL) have them applied and pushed for the current cycle, but they are not code
> fixes anyway, so it's not critical.
>
> TL;DR: Yes, please take them, thanks!
Got it. Both applied for next. Thanks.
Regards,
Leo