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 <redacted>
---
drivers/video/fbdev/offb.c | 1 +
1 file changed, 1 insertion(+)
@@ -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 */
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 <redacted>
---
arch/powerpc/include/asm/prom.h | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
@@ -12,15 +12,9 @@*UpdatesforPPC64byPeterBergner&DavidEngebretsen,IBMCorp.*/#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>++structdevice_node;+structproperty;#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */#define OF_DT_END_NODE 0x2 /* End node */
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 <redacted>
---
drivers/scsi/cxlflash/ocxl_hw.c | 1 +
1 file changed, 1 insertion(+)
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 <redacted>
Acked-by: Helge Deller <deller@gmx.de>
I assume you take this through the linuxppc git tree?
Helge