Re: [PATCH] um: kunit: resolve missing prototypes warning

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

 



On Wed, 2024-09-04 at 15:50 +0200, Gabriele Monaco wrote:
> While building for KUnit with default settings, the build is generating
> the following compilation warnings.
> 
> ```
> $ make ARCH=um O=.kunit --jobs=16
> ../lib/iomap.c:156:5: warning: no previous prototype for
> ‘ioread64_lo_hi’ [-Wmissing-prototypes]
>   156 | u64 ioread64_lo_hi(const void __iomem *addr)
>       |     ^~~~~~~~~~~~~~
> [...]
> ```
> 
> The warning happens because the prototypes are defined in
> `asm-generic/iomap.h` only when `readq` and `writeq` are defined.
> For UM, those function get some default definitions but are currently
> defined _after_ the prototypes for `ioread64*`/`iowrite64*` functions.
> Moving the inclusion of `asm-generic/iomap.h` fixes it.
> 
> Signed-off-by: Gabriele Monaco <gmonaco@xxxxxxxxxx>
> ---
>  include/asm-generic/io.h | 8 ++++----

I get that you have this on kunit on ARCH=um, but that makes it neither
a kunit nor a um patch :)

Arnd had originally wanted to fix this another way, but that got
dropped. I don't know if this fix is right, though I can see that it
works. I have the same workaround in my tree, but I'm really not
convinced that it doesn't have side-effects on other architectures.

johannes





[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