Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2020 08:56:22 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r361163 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202005180856.04I8uMou044139@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon May 18 08:56:22 2020
New Revision: 361163
URL: https://svnweb.freebsd.org/changeset/base/361163

Log:
  MFC r360115:
  Allow the ERR_CAST() function in the LinuxKPI to take a const void pointer.
  No functional change.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/err.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/err.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/err.h	Mon May 18 08:55:49 2020	(r361162)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/err.h	Mon May 18 08:56:22 2020	(r361163)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005180856.04I8uMou044139>