Re: [PATCH] iomap: Fix -Wmissing-prototypes on UM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 03, 2025 at 09:18:33AM +0100, Arnd Bergmann wrote:
> On Mon, Feb 3, 2025, at 08:26, Thomas Weißschuh wrote:
> > Building lib/iomap.o on UM triggers warnings about missing prototypes.
> > These prototypes should be defined by asm-generic/iomap.h, depending on
> > other symbols. For example "ioread64_lo_hi" is based on "readq".
> > However the generic variants of those tested symbols are defined in
> > asm-generic/io.h, only after asm-generic/iomap.h has already been
> > included, breaking the ifdef logic.
> 
> Sorry I never took the time to fix this so far.
> 
> > --- a/include/asm-generic/io.h
> > +++ b/include/asm-generic/io.h
> > @@ -13,10 +13,6 @@
> >  #include <linux/types.h>
> >  #include <linux/instruction_pointer.h>
> > 
> > -#ifdef CONFIG_GENERIC_IOMAP
> > -#include <asm-generic/iomap.h>
> > -#endif
> > -
> >  #include <asm/mmiowb.h>
> >  #include <asm-generic/pci_iomap.h>
> > 
> > @@ -1250,4 +1246,8 @@ extern int devmem_is_allowed(unsigned long pfn);
> > 
> >  #endif /* __KERNEL__ */
> > 
> > +#ifdef CONFIG_GENERIC_IOMAP
> > +#include <asm-generic/iomap.h>
> > +#endif
> > +
> >  #endif /* __ASM_GENERIC_IO_H */
> 
> I have not tried it yet, but I suspect this is not the correct
> fix here. Unfortunately the indirect header inclusions in this
> file are way too complicated with corner cases in various
> architectures. How much testing have you given your patch
> across other targets? I think the last time we tried to address
> it, we broke mips or parisc.

It was build-tested on 0day.
I also gave it some light boot testing on kunit/qemu.
(Neither on mips or parisc)




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux