svn commit: r360115 - head/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Apr 20 13:36:02 UTC 2020
Author: hselasky
Date: Mon Apr 20 13:36:01 2020
New Revision: 360115
URL: https://svnweb.freebsd.org/changeset/base/360115
Log:
Allow the ERR_CAST() function in the LinuxKPI to take a const void pointer.
No functional change.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/include/linux/err.h
Modified: head/sys/compat/linuxkpi/common/include/linux/err.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/err.h Mon Apr 20 13:19:23 2020 (r360114)
+++ head/sys/compat/linuxkpi/common/include/linux/err.h Mon Apr 20 13:36:01 2020 (r360115)
@@ -31,6 +31,8 @@
#ifndef _LINUX_ERR_H_
#define _LINUX_ERR_H_
+#include <sys/types.h>
+
#include <linux/compiler.h>
#define MAX_ERRNO 4095
@@ -62,9 +64,9 @@ IS_ERR_OR_NULL(const void *ptr)
}
static inline void *
-ERR_CAST(void *ptr)
+ERR_CAST(const void *ptr)
{
- return (void *)ptr;
+ return __DECONST(void *, ptr);
}
static inline int
More information about the svn-src-all
mailing list