diff mbox series

cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h

Message ID a2bae89b280e7a7cb87889635d9911d6a245e780.1648833388.git.christophe.leroy@csgroup.eu (mailing list archive)
State Accepted
Headers show
Series cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h | 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

Christophe Leroy April 2, 2022, 9:52 a.m. UTC
powerpc's asm/prom.h brings some headers that it doesn't
need itself.

In order to clean it up, first add missing headers in
users of asm/prom.h

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 drivers/misc/cxl/api.c      | 1 +
 drivers/misc/cxl/cxl.h      | 2 ++
 drivers/misc/cxl/cxllib.c   | 1 +
 drivers/misc/cxl/flash.c    | 1 +
 drivers/misc/cxl/guest.c    | 2 ++
 drivers/misc/cxl/irq.c      | 1 +
 drivers/misc/cxl/main.c     | 1 +
 drivers/misc/cxl/native.c   | 1 +
 drivers/misc/ocxl/afu_irq.c | 1 +
 drivers/misc/ocxl/link.c    | 1 +
 10 files changed, 12 insertions(+)

Comments

Andrew Donnellan April 6, 2022, 6:43 a.m. UTC | #1
On 2/4/22 20:52, Christophe Leroy wrote:
> powerpc's asm/prom.h brings some headers that it doesn't
> need itself.
> 
> In order to clean it up, first add missing headers in
> users of asm/prom.h
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>

Untested because I don't have your actual patch to change prom.h, but 
nothing here looks concerning.

Acked-by: Andrew Donnellan <ajd@linux.ibm.com>

> ---
>   drivers/misc/cxl/api.c      | 1 +
>   drivers/misc/cxl/cxl.h      | 2 ++
>   drivers/misc/cxl/cxllib.c   | 1 +
>   drivers/misc/cxl/flash.c    | 1 +
>   drivers/misc/cxl/guest.c    | 2 ++
>   drivers/misc/cxl/irq.c      | 1 +
>   drivers/misc/cxl/main.c     | 1 +
>   drivers/misc/cxl/native.c   | 1 +
>   drivers/misc/ocxl/afu_irq.c | 1 +
>   drivers/misc/ocxl/link.c    | 1 +
>   10 files changed, 12 insertions(+)
> 
> diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c
> index b493de962153..d85c56530863 100644
> --- a/drivers/misc/cxl/api.c
> +++ b/drivers/misc/cxl/api.c
> @@ -12,6 +12,7 @@
>   #include <linux/pseudo_fs.h>
>   #include <linux/sched/mm.h>
>   #include <linux/mmu_context.h>
> +#include <linux/irqdomain.h>
>   
>   #include "cxl.h"
>   
> diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h
> index 5dc0f6093f9d..7a6dd91987fd 100644
> --- a/drivers/misc/cxl/cxl.h
> +++ b/drivers/misc/cxl/cxl.h
> @@ -25,6 +25,8 @@
>   
>   extern uint cxl_verbose;
>   
> +struct property;
> +
>   #define CXL_TIMEOUT 5
>   
>   /*
> diff --git a/drivers/misc/cxl/cxllib.c b/drivers/misc/cxl/cxllib.c
> index 53b919856426..e5fe0a171472 100644
> --- a/drivers/misc/cxl/cxllib.c
> +++ b/drivers/misc/cxl/cxllib.c
> @@ -5,6 +5,7 @@
>   
>   #include <linux/hugetlb.h>
>   #include <linux/sched/mm.h>
> +#include <asm/opal-api.h>
>   #include <asm/pnv-pci.h>
>   #include <misc/cxllib.h>
>   
> diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
> index 5b93ff51d82a..eee9decc121e 100644
> --- a/drivers/misc/cxl/flash.c
> +++ b/drivers/misc/cxl/flash.c
> @@ -4,6 +4,7 @@
>   #include <linux/semaphore.h>
>   #include <linux/slab.h>
>   #include <linux/uaccess.h>
> +#include <linux/of.h>
>   #include <asm/rtas.h>
>   
>   #include "cxl.h"
> diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> index 9d485c9e3fff..3321c014913c 100644
> --- a/drivers/misc/cxl/guest.c
> +++ b/drivers/misc/cxl/guest.c
> @@ -6,6 +6,8 @@
>   #include <linux/spinlock.h>
>   #include <linux/uaccess.h>
>   #include <linux/delay.h>
> +#include <linux/irqdomain.h>
> +#include <linux/platform_device.h>
>   
>   #include "cxl.h"
>   #include "hcalls.h"
> diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c
> index 4cb829d5d873..5f0e2dcebb34 100644
> --- a/drivers/misc/cxl/irq.c
> +++ b/drivers/misc/cxl/irq.c
> @@ -4,6 +4,7 @@
>    */
>   
>   #include <linux/interrupt.h>
> +#include <linux/irqdomain.h>
>   #include <linux/workqueue.h>
>   #include <linux/sched.h>
>   #include <linux/wait.h>
> diff --git a/drivers/misc/cxl/main.c b/drivers/misc/cxl/main.c
> index 43b312d06e3e..c1fbf6f588f7 100644
> --- a/drivers/misc/cxl/main.c
> +++ b/drivers/misc/cxl/main.c
> @@ -15,6 +15,7 @@
>   #include <linux/slab.h>
>   #include <linux/idr.h>
>   #include <linux/pci.h>
> +#include <linux/platform_device.h>
>   #include <linux/sched/task.h>
>   
>   #include <asm/cputable.h>
> diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
> index 1a7f22836041..50b0c44bb8d7 100644
> --- a/drivers/misc/cxl/native.c
> +++ b/drivers/misc/cxl/native.c
> @@ -11,6 +11,7 @@
>   #include <linux/mm.h>
>   #include <linux/uaccess.h>
>   #include <linux/delay.h>
> +#include <linux/irqdomain.h>
>   #include <asm/synch.h>
>   #include <asm/switch_to.h>
>   #include <misc/cxl-base.h>
> diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c
> index ecdcfae025b7..a06920b7e049 100644
> --- a/drivers/misc/ocxl/afu_irq.c
> +++ b/drivers/misc/ocxl/afu_irq.c
> @@ -1,6 +1,7 @@
>   // SPDX-License-Identifier: GPL-2.0+
>   // Copyright 2017 IBM Corp.
>   #include <linux/interrupt.h>
> +#include <linux/irqdomain.h>
>   #include <asm/pnv-ocxl.h>
>   #include <asm/xive.h>
>   #include "ocxl_internal.h"
> diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
> index 9670d02c927f..4cf4c55a5f00 100644
> --- a/drivers/misc/ocxl/link.c
> +++ b/drivers/misc/ocxl/link.c
> @@ -6,6 +6,7 @@
>   #include <linux/mm_types.h>
>   #include <linux/mmu_context.h>
>   #include <linux/mmu_notifier.h>
> +#include <linux/irqdomain.h>
>   #include <asm/copro.h>
>   #include <asm/pnv-ocxl.h>
>   #include <asm/xive.h>
Christophe Leroy April 6, 2022, 6:52 a.m. UTC | #2
Le 06/04/2022 à 08:43, Andrew Donnellan a écrit :
> On 2/4/22 20:52, Christophe Leroy wrote:
>> powerpc's asm/prom.h brings some headers that it doesn't
>> need itself.
>>
>> In order to clean it up, first add missing headers in
>> users of asm/prom.h
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> 
> Untested because I don't have your actual patch to change prom.h, but 
> nothing here looks concerning.

Yes I'll send the patch to cleanup prom.h in a future cycle, once all 
preparation patches are merged by all subsystems maintainers.

> 
> Acked-by: Andrew Donnellan <ajd@linux.ibm.com>

Thanks. Can you take the patch through your tree ?

Christophe
Andrew Donnellan April 6, 2022, 6:53 a.m. UTC | #3
On 6/4/22 16:52, Christophe Leroy wrote:
> Thanks. Can you take the patch through your tree ?

We don't have a tree of our own, we rely on mpe to take it through powerpc.
Frederic Barrat April 6, 2022, 8:54 a.m. UTC | #4
On 02/04/2022 11:52, Christophe Leroy wrote:
> powerpc's asm/prom.h brings some headers that it doesn't
> need itself.
> 
> In order to clean it up, first add missing headers in
> users of asm/prom.h
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---

LGTM
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>


>   drivers/misc/cxl/api.c      | 1 +
>   drivers/misc/cxl/cxl.h      | 2 ++
>   drivers/misc/cxl/cxllib.c   | 1 +
>   drivers/misc/cxl/flash.c    | 1 +
>   drivers/misc/cxl/guest.c    | 2 ++
>   drivers/misc/cxl/irq.c      | 1 +
>   drivers/misc/cxl/main.c     | 1 +
>   drivers/misc/cxl/native.c   | 1 +
>   drivers/misc/ocxl/afu_irq.c | 1 +
>   drivers/misc/ocxl/link.c    | 1 +
>   10 files changed, 12 insertions(+)
> 
> diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c
> index b493de962153..d85c56530863 100644
> --- a/drivers/misc/cxl/api.c
> +++ b/drivers/misc/cxl/api.c
> @@ -12,6 +12,7 @@
>   #include <linux/pseudo_fs.h>
>   #include <linux/sched/mm.h>
>   #include <linux/mmu_context.h>
> +#include <linux/irqdomain.h>
>   
>   #include "cxl.h"
>   
> diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h
> index 5dc0f6093f9d..7a6dd91987fd 100644
> --- a/drivers/misc/cxl/cxl.h
> +++ b/drivers/misc/cxl/cxl.h
> @@ -25,6 +25,8 @@
>   
>   extern uint cxl_verbose;
>   
> +struct property;
> +
>   #define CXL_TIMEOUT 5
>   
>   /*
> diff --git a/drivers/misc/cxl/cxllib.c b/drivers/misc/cxl/cxllib.c
> index 53b919856426..e5fe0a171472 100644
> --- a/drivers/misc/cxl/cxllib.c
> +++ b/drivers/misc/cxl/cxllib.c
> @@ -5,6 +5,7 @@
>   
>   #include <linux/hugetlb.h>
>   #include <linux/sched/mm.h>
> +#include <asm/opal-api.h>
>   #include <asm/pnv-pci.h>
>   #include <misc/cxllib.h>
>   
> diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
> index 5b93ff51d82a..eee9decc121e 100644
> --- a/drivers/misc/cxl/flash.c
> +++ b/drivers/misc/cxl/flash.c
> @@ -4,6 +4,7 @@
>   #include <linux/semaphore.h>
>   #include <linux/slab.h>
>   #include <linux/uaccess.h>
> +#include <linux/of.h>
>   #include <asm/rtas.h>
>   
>   #include "cxl.h"
> diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> index 9d485c9e3fff..3321c014913c 100644
> --- a/drivers/misc/cxl/guest.c
> +++ b/drivers/misc/cxl/guest.c
> @@ -6,6 +6,8 @@
>   #include <linux/spinlock.h>
>   #include <linux/uaccess.h>
>   #include <linux/delay.h>
> +#include <linux/irqdomain.h>
> +#include <linux/platform_device.h>
>   
>   #include "cxl.h"
>   #include "hcalls.h"
> diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c
> index 4cb829d5d873..5f0e2dcebb34 100644
> --- a/drivers/misc/cxl/irq.c
> +++ b/drivers/misc/cxl/irq.c
> @@ -4,6 +4,7 @@
>    */
>   
>   #include <linux/interrupt.h>
> +#include <linux/irqdomain.h>
>   #include <linux/workqueue.h>
>   #include <linux/sched.h>
>   #include <linux/wait.h>
> diff --git a/drivers/misc/cxl/main.c b/drivers/misc/cxl/main.c
> index 43b312d06e3e..c1fbf6f588f7 100644
> --- a/drivers/misc/cxl/main.c
> +++ b/drivers/misc/cxl/main.c
> @@ -15,6 +15,7 @@
>   #include <linux/slab.h>
>   #include <linux/idr.h>
>   #include <linux/pci.h>
> +#include <linux/platform_device.h>
>   #include <linux/sched/task.h>
>   
>   #include <asm/cputable.h>
> diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
> index 1a7f22836041..50b0c44bb8d7 100644
> --- a/drivers/misc/cxl/native.c
> +++ b/drivers/misc/cxl/native.c
> @@ -11,6 +11,7 @@
>   #include <linux/mm.h>
>   #include <linux/uaccess.h>
>   #include <linux/delay.h>
> +#include <linux/irqdomain.h>
>   #include <asm/synch.h>
>   #include <asm/switch_to.h>
>   #include <misc/cxl-base.h>
> diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c
> index ecdcfae025b7..a06920b7e049 100644
> --- a/drivers/misc/ocxl/afu_irq.c
> +++ b/drivers/misc/ocxl/afu_irq.c
> @@ -1,6 +1,7 @@
>   // SPDX-License-Identifier: GPL-2.0+
>   // Copyright 2017 IBM Corp.
>   #include <linux/interrupt.h>
> +#include <linux/irqdomain.h>
>   #include <asm/pnv-ocxl.h>
>   #include <asm/xive.h>
>   #include "ocxl_internal.h"
> diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
> index 9670d02c927f..4cf4c55a5f00 100644
> --- a/drivers/misc/ocxl/link.c
> +++ b/drivers/misc/ocxl/link.c
> @@ -6,6 +6,7 @@
>   #include <linux/mm_types.h>
>   #include <linux/mmu_context.h>
>   #include <linux/mmu_notifier.h>
> +#include <linux/irqdomain.h>
>   #include <asm/copro.h>
>   #include <asm/pnv-ocxl.h>
>   #include <asm/xive.h>
Michael Ellerman May 15, 2022, 10:28 a.m. UTC | #5
On Sat, 2 Apr 2022 11:52:33 +0200, Christophe Leroy wrote:
> powerpc's asm/prom.h brings some headers that it doesn't
> need itself.
> 
> In order to clean it up, first add missing headers in
> users of asm/prom.h
> 
> 
> [...]

Applied to powerpc/next.

[1/1] cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h
      https://git.kernel.org/powerpc/c/d8d2af70b98109418bb16ff6638d7c1c4336f7fe

cheers
diff mbox series

Patch

diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c
index b493de962153..d85c56530863 100644
--- a/drivers/misc/cxl/api.c
+++ b/drivers/misc/cxl/api.c
@@ -12,6 +12,7 @@ 
 #include <linux/pseudo_fs.h>
 #include <linux/sched/mm.h>
 #include <linux/mmu_context.h>
+#include <linux/irqdomain.h>
 
 #include "cxl.h"
 
diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h
index 5dc0f6093f9d..7a6dd91987fd 100644
--- a/drivers/misc/cxl/cxl.h
+++ b/drivers/misc/cxl/cxl.h
@@ -25,6 +25,8 @@ 
 
 extern uint cxl_verbose;
 
+struct property;
+
 #define CXL_TIMEOUT 5
 
 /*
diff --git a/drivers/misc/cxl/cxllib.c b/drivers/misc/cxl/cxllib.c
index 53b919856426..e5fe0a171472 100644
--- a/drivers/misc/cxl/cxllib.c
+++ b/drivers/misc/cxl/cxllib.c
@@ -5,6 +5,7 @@ 
 
 #include <linux/hugetlb.h>
 #include <linux/sched/mm.h>
+#include <asm/opal-api.h>
 #include <asm/pnv-pci.h>
 #include <misc/cxllib.h>
 
diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
index 5b93ff51d82a..eee9decc121e 100644
--- a/drivers/misc/cxl/flash.c
+++ b/drivers/misc/cxl/flash.c
@@ -4,6 +4,7 @@ 
 #include <linux/semaphore.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
+#include <linux/of.h>
 #include <asm/rtas.h>
 
 #include "cxl.h"
diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
index 9d485c9e3fff..3321c014913c 100644
--- a/drivers/misc/cxl/guest.c
+++ b/drivers/misc/cxl/guest.c
@@ -6,6 +6,8 @@ 
 #include <linux/spinlock.h>
 #include <linux/uaccess.h>
 #include <linux/delay.h>
+#include <linux/irqdomain.h>
+#include <linux/platform_device.h>
 
 #include "cxl.h"
 #include "hcalls.h"
diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c
index 4cb829d5d873..5f0e2dcebb34 100644
--- a/drivers/misc/cxl/irq.c
+++ b/drivers/misc/cxl/irq.c
@@ -4,6 +4,7 @@ 
  */
 
 #include <linux/interrupt.h>
+#include <linux/irqdomain.h>
 #include <linux/workqueue.h>
 #include <linux/sched.h>
 #include <linux/wait.h>
diff --git a/drivers/misc/cxl/main.c b/drivers/misc/cxl/main.c
index 43b312d06e3e..c1fbf6f588f7 100644
--- a/drivers/misc/cxl/main.c
+++ b/drivers/misc/cxl/main.c
@@ -15,6 +15,7 @@ 
 #include <linux/slab.h>
 #include <linux/idr.h>
 #include <linux/pci.h>
+#include <linux/platform_device.h>
 #include <linux/sched/task.h>
 
 #include <asm/cputable.h>
diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
index 1a7f22836041..50b0c44bb8d7 100644
--- a/drivers/misc/cxl/native.c
+++ b/drivers/misc/cxl/native.c
@@ -11,6 +11,7 @@ 
 #include <linux/mm.h>
 #include <linux/uaccess.h>
 #include <linux/delay.h>
+#include <linux/irqdomain.h>
 #include <asm/synch.h>
 #include <asm/switch_to.h>
 #include <misc/cxl-base.h>
diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c
index ecdcfae025b7..a06920b7e049 100644
--- a/drivers/misc/ocxl/afu_irq.c
+++ b/drivers/misc/ocxl/afu_irq.c
@@ -1,6 +1,7 @@ 
 // SPDX-License-Identifier: GPL-2.0+
 // Copyright 2017 IBM Corp.
 #include <linux/interrupt.h>
+#include <linux/irqdomain.h>
 #include <asm/pnv-ocxl.h>
 #include <asm/xive.h>
 #include "ocxl_internal.h"
diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
index 9670d02c927f..4cf4c55a5f00 100644
--- a/drivers/misc/ocxl/link.c
+++ b/drivers/misc/ocxl/link.c
@@ -6,6 +6,7 @@ 
 #include <linux/mm_types.h>
 #include <linux/mmu_context.h>
 #include <linux/mmu_notifier.h>
+#include <linux/irqdomain.h>
 #include <asm/copro.h>
 #include <asm/pnv-ocxl.h>
 #include <asm/xive.h>