File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 11
11
*/
12
12
#define MAX_ERRNO 4095
13
13
14
- #define IS_ERR_VALUE (x ) ((x) >= (unsigned long )-MAX_ERRNO)
14
+ #define IS_ERR_VALUE (x ) ((x) >= (uintptr_t )-MAX_ERRNO)
15
15
16
- static inline void * ERR_PTR (long error )
16
+ static inline void * ERR_PTR (uintptr_t error )
17
17
{
18
18
return (void * ) error ;
19
19
}
20
20
21
- static inline long PTR_ERR (const void * ptr )
21
+ static inline uintptr_t PTR_ERR (const void * ptr )
22
22
{
23
- return (long ) ptr ;
23
+ return (uintptr_t ) ptr ;
24
24
}
25
25
26
- static inline long IS_ERR (const void * ptr )
26
+ static inline uintptr_t IS_ERR (const void * ptr )
27
27
{
28
- return IS_ERR_VALUE ((unsigned long )ptr );
28
+ return IS_ERR_VALUE ((uintptr_t )ptr );
29
29
}
30
30
31
- static inline long IS_ERR_OR_NULL (const void * ptr )
31
+ static inline uintptr_t IS_ERR_OR_NULL (const void * ptr )
32
32
{
33
- return !ptr || IS_ERR_VALUE ((unsigned long )ptr );
33
+ return !ptr || IS_ERR_VALUE ((uintptr_t )ptr );
34
34
}
35
35
36
36
static inline int PTR_ERR_OR_ZERO (const void * ptr )
You can’t perform that action at this time.
0 commit comments