diff mbox series

[v2,3/3] soc: fsl: Replace kernel.h with the necessary inclusions

Message ID 20211110105952.62013-3-andriy.shevchenko@linux.intel.com (mailing list archive)
State Handled Elsewhere
Headers show
Series [v2,1/3] soc: fsl: Correct MAINTAINERS database (QUICC ENGINE LIBRARY) | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 7 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 24 jobs.

Commit Message

Andy Shevchenko Nov. 10, 2021, 10:59 a.m. UTC
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>
---
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(-)

Comments

Andy Shevchenko Nov. 15, 2021, 11:30 a.m. UTC | #1
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 <andriy.shevchenko@linux.intel.com>
> ---
> 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.
Leo Li Nov. 15, 2021, 10:24 p.m. UTC | #2
> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Sent: Monday, November 15, 2021 5:30 AM
> To: linux-kernel@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-arm-
> kernel@lists.infradead.org
> Cc: Leo Li <leoyang.li@nxp.com>; Qiang Zhao <qiang.zhao@nxp.com>
> 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 <andriy.shevchenko@linux.intel.com>
> > ---
> > 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
Andy Shevchenko Nov. 16, 2021, 9:38 a.m. UTC | #3
On Mon, Nov 15, 2021 at 10:24:36PM +0000, Leo Li wrote:
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 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.
Andy Shevchenko Nov. 23, 2021, 4:28 p.m. UTC | #4
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 <andriy.shevchenko@linux.intel.com>
> > > 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?
Leo Li Dec. 1, 2021, 7:41 p.m. UTC | #5
On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com>
> > > > 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
Andy Shevchenko Dec. 2, 2021, 9:33 a.m. UTC | #6
On Wed, Dec 01, 2021 at 01:41:16PM -0600, Li Yang wrote:
> On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com>
> > > > > 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.
Leo Li Dec. 2, 2021, 8:01 p.m. UTC | #7
> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Sent: Thursday, December 2, 2021 3:33 AM
> To: Leo Li <leoyang.li@nxp.com>
> Cc: linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; Qiang Zhao <qiang.zhao@nxp.com>
> 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
> > <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com>
> > > > > > 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
Andy Shevchenko Dec. 2, 2021, 9:26 p.m. UTC | #8
On Thu, Dec 02, 2021 at 08:01:54PM +0000, Leo Li wrote:
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 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
> > > <andriy.shevchenko@linux.intel.com> 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!
Leo Li Dec. 2, 2021, 10:28 p.m. UTC | #9
On Thu, Dec 2, 2021 at 3:30 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Dec 02, 2021 at 08:01:54PM +0000, Leo Li wrote:
> > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 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
> > > > <andriy.shevchenko@linux.intel.com> 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
diff mbox series

Patch

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>