git: 34dae08e6c1c - main - linuxkpi: Use an inline function for the _ioremap_attr stub.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Apr 2022 23:09:48 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=34dae08e6c1cc8a5f3fcffb2edd5fc9123700ba6 commit 34dae08e6c1cc8a5f3fcffb2edd5fc9123700ba6 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-13 23:08:22 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-13 23:08:22 +0000 linuxkpi: Use an inline function for the _ioremap_attr stub. This "consumes" variables passed to ioremap*() avoiding set but unused warnings. --- sys/compat/linuxkpi/common/include/linux/io.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index d2ebf7e328cf..0790e518a1a3 100644 --- a/sys/compat/linuxkpi/common/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h @@ -393,7 +393,11 @@ _outb(u_char data, u_int port) #if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__) || defined(__riscv) void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr); #else -#define _ioremap_attr(...) NULL +static __inline void * +_ioremap_attr(vm_paddr_t _phys_addr, unsigned long _size, int _attr) +{ + return (NULL); +} #endif #ifdef VM_MEMATTR_DEVICE