diff options
author | Vladimir Kondratyev <wulf@FreeBSD.org> | 2023-12-24 08:19:59 +0000 |
---|---|---|
committer | Vladimir Kondratyev <wulf@FreeBSD.org> | 2023-12-24 08:19:59 +0000 |
commit | af787b8e8b803dbb2c6bd06629974ba39bd0fb70 (patch) | |
tree | 41859e71a8610fc6b689a33204762d384fd91aa4 | |
parent | e964da141523e1eec2322082936cdb20ba0cf4a7 (diff) | |
download | src-af787b8e8b803dbb2c6bd06629974ba39bd0fb70.tar.gz src-af787b8e8b803dbb2c6bd06629974ba39bd0fb70.zip |
LinuxKPI: Add IOMEM_ERR_PTR() to linux/io.h
The function creates an error pointer.
Sponsored by: Serenity Cyber Security, LLC
Reviewed by: manu, bz
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42805
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/io.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index b0a4109f3afb..d70cda77400e 100644 --- a/sys/compat/linuxkpi/common/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h @@ -35,6 +35,7 @@ #include <machine/vm.h> #include <linux/compiler.h> +#include <linux/err.h> #include <linux/types.h> #if !defined(__arm__) #include <asm/set_memory.h> @@ -528,6 +529,8 @@ memunmap(void *addr) iounmap(addr); } +#define IOMEM_ERR_PTR(err) (void __iomem *)ERR_PTR(err) + #define __MTRR_ID_BASE 1 int lkpi_arch_phys_wc_add(unsigned long, unsigned long); void lkpi_arch_phys_wc_del(int); |