aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-04-13 23:08:22 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-04-13 23:08:22 +0000
commit34dae08e6c1cc8a5f3fcffb2edd5fc9123700ba6 (patch)
tree54b4907d8c34c3d85996f05a3187aa38db866fee /sys/compat/linuxkpi
parent69c595ed7f492dce8274fde6ed1cc3301a6ddb3c (diff)
downloadsrc-34dae08e6c1cc8a5f3fcffb2edd5fc9123700ba6.tar.gz
src-34dae08e6c1cc8a5f3fcffb2edd5fc9123700ba6.zip
linuxkpi: Use an inline function for the _ioremap_attr stub.
This "consumes" variables passed to ioremap*() avoiding set but unused warnings.
Diffstat (limited to 'sys/compat/linuxkpi')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/io.h6
1 files changed, 5 insertions, 1 deletions
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