50faf2a111cde1b47d1b482e70a1900a5fd215ef
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / linux / err.h
1 #ifndef __LINUX_ERR_WRAPPER_H
2 #define __LINUX_ERR_WRAPPER_H 1
3
4 #include_next <linux/err.h>
5
6 #ifndef HAVE_ERR_CAST
7 /**
8  * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
9  * @ptr: The pointer to cast.
10  *
11  * Explicitly cast an error-valued pointer to another pointer type in such a
12  * way as to make it clear that's what's going on.
13  */
14 static inline void *ERR_CAST(const void *ptr)
15 {
16         /* cast away the const */
17         return (void *) ptr;
18 }
19 #endif /* HAVE_ERR_CAST */
20
21 #endif