Module Name: src
Committed By: riastradh
Date: Sun Dec 19 00:49:08 UTC 2021
Modified Files:
src/sys/external/bsd/common/include/linux: kernel.h
Log Message:
Define u64_to_user_ptr.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/external/bsd/common/include/linux/kernel.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/common/include/linux/kernel.h
diff -u src/sys/external/bsd/common/include/linux/kernel.h:1.31 src/sys/external/bsd/common/include/linux/kernel.h:1.32
--- src/sys/external/bsd/common/include/linux/kernel.h:1.31 Sun Dec 19 00:48:23 2021
+++ src/sys/external/bsd/common/include/linux/kernel.h Sun Dec 19 00:49:08 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.31 2021/12/19 00:48:23 riastradh Exp $ */
+/* $NetBSD: kernel.h,v 1.32 2021/12/19 00:49:08 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -249,4 +249,11 @@ kasprintf(gfp_t gfp, const char *fmt, ..
return str;
}
+static inline void __user *
+u64_to_user_ptr(uint64_t addr)
+{
+
+ return (void __user *)(uintptr_t)addr;
+}
+
#endif /* _LINUX_KERNEL_H_ */