On Mon, Mar 3, 2025, at 08:48, Andy Shevchenko wrote: > On Fri, Feb 28, 2025 at 09:08:15PM +0200, Raag Jadav wrote: >> > > > Ah, you mean devres related? >> > > >> > > Yeah, couldn't find it on Arnd's tree and I'm not sure if this series >> > > works without it. >> > >> > But err.h is included in the io.h, no? Or did I misunderstand the point? >> >> First patch on the immutable tag moves IOMEM_ERR_PTR() to err.h and here >> we're dropping err.h from io.h. So without the tag this series will probably >> break IOMEM_ERR_PTR(). > > I see, I think it might be due to some other includes that make this happen. > Whatever, I assume that Arnd heavily tested this anyway, so it's good to go > independently on the immutable tag.. I see that err.h gets included through at least linux/string.h, linux/logic_pio.h and (depending on the architecture architectures) asm/page.h, so there is no huge risk of something breaking here ;-) Ideally all of the above should be removed here, but to do it right, the linux/pgtable.h dependency needs to also be replaced with a smaller pgprot_t specific one, which takes a bit of cross-platform work as the definition is not in a consistent place at the moment. The change below still builds fine, and that likely indicates that the same headers are still included from either asm/io.h or asm/pgtable.h on the architectures I'm testing. Arnd ---- diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 402020b23423..60a162591072 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -7,16 +7,16 @@ #ifndef __ASM_GENERIC_IO_H #define __ASM_GENERIC_IO_H -#include <asm/page.h> /* I/O is all done through memory accesses */ -#include <linux/string.h> /* for memset() and memcpy() */ #include <linux/sizes.h> #include <linux/types.h> #include <linux/instruction_pointer.h> +#include <linux/compiler.h> #ifdef CONFIG_GENERIC_IOMAP #include <asm-generic/iomap.h> #endif +#include <asm/byteorder.h> #include <asm/mmiowb.h> #include <asm-generic/pci_iomap.h> diff --git a/include/linux/logic_pio.h b/include/linux/logic_pio.h index 8f1a9408302f..a83286bf13ab 100644 --- a/include/linux/logic_pio.h +++ b/include/linux/logic_pio.h @@ -8,7 +8,9 @@ #ifndef __LINUX_LOGIC_PIO_H #define __LINUX_LOGIC_PIO_H -#include <linux/fwnode.h> +#include <linux/types.h> + +struct fwnode_handle; enum { LOGIC_PIO_INDIRECT, /* Indirect IO flag */