dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h
@ 2022-06-11 16:50 Christophe Leroy
  2022-06-11 16:50 ` [PATCH 2/4] scsi: cxlflash: Include missing linux/irqdomain.h Christophe Leroy
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Christophe Leroy @ 2022-06-11 16:50 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, deller,
	manoj, mrochs, ukrishn, jejb, martin.petersen, tzimmermann
  Cc: linux-fbdev, linux-scsi, linux-kernel, dri-devel,
	Christophe Leroy, linuxppc-dev

A lot of drivers were getting platform and of headers
indirectly via headers like asm/pci.h or asm/prom.h

Most of them were fixed during 5.19 cycle but a newissue was
introduced by commit 52b1b46c39ae ("of: Create platform devices
for OF framebuffers")

Include missing platform_device.h to allow cleaning asm/pci.h

Cc: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 52b1b46c39ae ("of: Create platform devices for OF framebuffers")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 drivers/video/fbdev/offb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index b1acb1ebebe9..91001990e351 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -26,6 +26,7 @@
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/pci.h>
+#include <linux/platform_device.h>
 #include <asm/io.h>
 
 #ifdef CONFIG_PPC32
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] scsi: cxlflash: Include missing linux/irqdomain.h
  2022-06-11 16:50 [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h Christophe Leroy
@ 2022-06-11 16:50 ` Christophe Leroy
  2022-06-11 16:50 ` [PATCH 3/4] powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h Christophe Leroy
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Christophe Leroy @ 2022-06-11 16:50 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, deller,
	manoj, mrochs, ukrishn, jejb, martin.petersen, tzimmermann
  Cc: linux-fbdev, linux-scsi, linux-kernel, dri-devel,
	Christophe Leroy, linuxppc-dev

powerpc's asm/prom.h brings some headers that it doesn't need itself.

Once those headers are removed from asm/prom.h, the following
errors occur:

  CC [M]  drivers/scsi/cxlflash/ocxl_hw.o
drivers/scsi/cxlflash/ocxl_hw.c: In function 'afu_map_irq':
drivers/scsi/cxlflash/ocxl_hw.c:195:16: error: implicit declaration of function 'irq_create_mapping' [-Werror=implicit-function-declaration]
  195 |         virq = irq_create_mapping(NULL, irq->hwirq);
      |                ^~~~~~~~~~~~~~~~~~
drivers/scsi/cxlflash/ocxl_hw.c:222:9: error: implicit declaration of function 'irq_dispose_mapping' [-Werror=implicit-function-declaration]
  222 |         irq_dispose_mapping(virq);
      |         ^~~~~~~~~~~~~~~~~~~
drivers/scsi/cxlflash/ocxl_hw.c: In function 'afu_unmap_irq':
drivers/scsi/cxlflash/ocxl_hw.c:264:13: error: implicit declaration of function 'irq_find_mapping'; did you mean 'is_cow_mapping'? [-Werror=implicit-function-declaration]
  264 |         if (irq_find_mapping(NULL, irq->hwirq)) {
      |             ^~~~~~~~~~~~~~~~
      |             is_cow_mapping
cc1: some warnings being treated as errors

Fix it by including linux/irqdomain.h

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 drivers/scsi/cxlflash/ocxl_hw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c
index 244fc27215dc..631eda2d467e 100644
--- a/drivers/scsi/cxlflash/ocxl_hw.c
+++ b/drivers/scsi/cxlflash/ocxl_hw.c
@@ -16,6 +16,7 @@
 #include <linux/poll.h>
 #include <linux/sched/signal.h>
 #include <linux/interrupt.h>
+#include <linux/irqdomain.h>
 #include <asm/xive.h>
 #include <misc/ocxl.h>
 
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h
  2022-06-11 16:50 [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h Christophe Leroy
  2022-06-11 16:50 ` [PATCH 2/4] scsi: cxlflash: Include missing linux/irqdomain.h Christophe Leroy
@ 2022-06-11 16:50 ` Christophe Leroy
  2022-06-11 16:51 ` [PATCH 4/4] powerpc: Finally remove unnecessary headers from asm/prom.h Christophe Leroy
  2022-06-20 18:15 ` [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h Helge Deller
  3 siblings, 0 replies; 5+ messages in thread
From: Christophe Leroy @ 2022-06-11 16:50 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, deller,
	manoj, mrochs, ukrishn, jejb, martin.petersen, tzimmermann
  Cc: linux-fbdev, linux-scsi, linux-kernel, dri-devel,
	Christophe Leroy, linuxppc-dev

asm/pci.h and asm/mpc52xx.h don't need asm/prom.h

Declare struct device_node locally to avoid including of.h

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/include/asm/mpc52xx.h | 3 ++-
 arch/powerpc/include/asm/pci.h     | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/mpc52xx.h b/arch/powerpc/include/asm/mpc52xx.h
index ce1e0aabaa64..f721a5c90e20 100644
--- a/arch/powerpc/include/asm/mpc52xx.h
+++ b/arch/powerpc/include/asm/mpc52xx.h
@@ -15,7 +15,6 @@
 
 #ifndef __ASSEMBLY__
 #include <asm/types.h>
-#include <asm/prom.h>
 #include <asm/mpc5xxx.h>
 #endif /* __ASSEMBLY__ */
 
@@ -268,6 +267,8 @@ struct mpc52xx_intr {
 
 #ifndef __ASSEMBLY__
 
+struct device_node;
+
 /* mpc52xx_common.c */
 extern void mpc5200_setup_xlb_arbiter(void);
 extern void mpc52xx_declare_of_platform_devices(void);
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index 915d6ee4b40a..0f182074cdb7 100644
--- a/arch/powerpc/include/asm/pci.h
+++ b/arch/powerpc/include/asm/pci.h
@@ -14,7 +14,6 @@
 
 #include <asm/machdep.h>
 #include <asm/io.h>
-#include <asm/prom.h>
 #include <asm/pci-bridge.h>
 
 /* Return values for pci_controller_ops.probe_mode function */
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] powerpc: Finally remove unnecessary headers from asm/prom.h
  2022-06-11 16:50 [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h Christophe Leroy
  2022-06-11 16:50 ` [PATCH 2/4] scsi: cxlflash: Include missing linux/irqdomain.h Christophe Leroy
  2022-06-11 16:50 ` [PATCH 3/4] powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h Christophe Leroy
@ 2022-06-11 16:51 ` Christophe Leroy
  2022-06-20 18:15 ` [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h Helge Deller
  3 siblings, 0 replies; 5+ messages in thread
From: Christophe Leroy @ 2022-06-11 16:51 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, deller,
	manoj, mrochs, ukrishn, jejb, martin.petersen, tzimmermann
  Cc: linux-fbdev, linux-scsi, linux-kernel, dri-devel,
	Christophe Leroy, linuxppc-dev

Remove all headers included from asm/prom.h which are not used
by asm/prom.h itself.

Declare struct device_node and struct property locally to
avoid including of.h

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/include/asm/prom.h | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 5c80152e8f18..93f112133934 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -12,15 +12,9 @@
  * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
  */
 #include <linux/types.h>
-#include <asm/irq.h>
-#include <linux/atomic.h>
-
-/* These includes should be removed once implicit includes are cleaned up. */
-#include <linux/of.h>
-#include <linux/of_fdt.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/platform_device.h>
+
+struct device_node;
+struct property;
 
 #define OF_DT_BEGIN_NODE	0x1		/* Start of node, full name */
 #define OF_DT_END_NODE		0x2		/* End node */
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h
  2022-06-11 16:50 [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h Christophe Leroy
                   ` (2 preceding siblings ...)
  2022-06-11 16:51 ` [PATCH 4/4] powerpc: Finally remove unnecessary headers from asm/prom.h Christophe Leroy
@ 2022-06-20 18:15 ` Helge Deller
  3 siblings, 0 replies; 5+ messages in thread
From: Helge Deller @ 2022-06-20 18:15 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, manoj, mrochs, ukrishn, jejb, martin.petersen,
	tzimmermann
  Cc: dri-devel, linux-fbdev, linuxppc-dev, linux-kernel, linux-scsi

On 6/11/22 18:50, Christophe Leroy wrote:
> A lot of drivers were getting platform and of headers
> indirectly via headers like asm/pci.h or asm/prom.h
>
> Most of them were fixed during 5.19 cycle but a newissue was
> introduced by commit 52b1b46c39ae ("of: Create platform devices
> for OF framebuffers")
>
> Include missing platform_device.h to allow cleaning asm/pci.h
>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 52b1b46c39ae ("of: Create platform devices for OF framebuffers")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>

Acked-by: Helge Deller <deller@gmx.de>

I assume you take this through the linuxppc git tree?

Helge

> ---
>  drivers/video/fbdev/offb.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index b1acb1ebebe9..91001990e351 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -26,6 +26,7 @@
>  #include <linux/init.h>
>  #include <linux/ioport.h>
>  #include <linux/pci.h>
> +#include <linux/platform_device.h>
>  #include <asm/io.h>
>
>  #ifdef CONFIG_PPC32


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-20 18:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-11 16:50 [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h Christophe Leroy
2022-06-11 16:50 ` [PATCH 2/4] scsi: cxlflash: Include missing linux/irqdomain.h Christophe Leroy
2022-06-11 16:50 ` [PATCH 3/4] powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h Christophe Leroy
2022-06-11 16:51 ` [PATCH 4/4] powerpc: Finally remove unnecessary headers from asm/prom.h Christophe Leroy
2022-06-20 18:15 ` [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).