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
This commit is contained in:
Hans Petter Selasky 2020-04-20 13:36:01 +00:00
parent 0fbdc3726a
commit 47c0672b08
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360115

View File

@ -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