1 /* See COPYRIGHT for copyright information. */
3 #ifndef ROS_INC_ERROR_H
4 #define ROS_INC_ERROR_H
10 #define ERR_PTR(err) ((void *)((uintptr_t)(err)))
11 #define PTR_ERR(ptr) ((uintptr_t)(ptr))
12 #define IS_ERR(ptr) ((uintptr_t)-(uintptr_t)(ptr) < 512)
14 /* The special format for printk %e takes an integer
15 * error code and prints a string describing the error.
16 * The integer may be positive or negative,
17 * so that -ENOMEM and ENOMEM are equivalent.
20 static const char *const error_string[] =
22 #include <errstrings.h>
24 #define NUMERRORS (sizeof(error_string)/sizeof(error_string[0]))
26 #endif // !ROS_INC_ERROR_H */