diff options
Diffstat (limited to 'include/linux/err.h')
| -rw-r--r-- | include/linux/err.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/err.h b/include/linux/err.h index f2edce25a76b..221fcfb676c4 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
| @@ -24,17 +24,17 @@ static inline void * __must_check ERR_PTR(long error) | |||
| 24 | return (void *) error; | 24 | return (void *) error; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | static inline long __must_check PTR_ERR(const void *ptr) | 27 | static inline long __must_check PTR_ERR(__force const void *ptr) |
| 28 | { | 28 | { |
| 29 | return (long) ptr; | 29 | return (long) ptr; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | static inline long __must_check IS_ERR(const void *ptr) | 32 | static inline long __must_check IS_ERR(__force const void *ptr) |
| 33 | { | 33 | { |
| 34 | return IS_ERR_VALUE((unsigned long)ptr); | 34 | return IS_ERR_VALUE((unsigned long)ptr); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | static inline long __must_check IS_ERR_OR_NULL(const void *ptr) | 37 | static inline long __must_check IS_ERR_OR_NULL(__force const void *ptr) |
| 38 | { | 38 | { |
| 39 | return !ptr || IS_ERR_VALUE((unsigned long)ptr); | 39 | return !ptr || IS_ERR_VALUE((unsigned long)ptr); |
| 40 | } | 40 | } |
| @@ -46,13 +46,13 @@ static inline long __must_check IS_ERR_OR_NULL(const void *ptr) | |||
| 46 | * Explicitly cast an error-valued pointer to another pointer type in such a | 46 | * Explicitly cast an error-valued pointer to another pointer type in such a |
| 47 | * way as to make it clear that's what's going on. | 47 | * way as to make it clear that's what's going on. |
| 48 | */ | 48 | */ |
| 49 | static inline void * __must_check ERR_CAST(const void *ptr) | 49 | static inline void * __must_check ERR_CAST(__force const void *ptr) |
| 50 | { | 50 | { |
| 51 | /* cast away the const */ | 51 | /* cast away the const */ |
| 52 | return (void *) ptr; | 52 | return (void *) ptr; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static inline int __must_check PTR_RET(const void *ptr) | 55 | static inline int __must_check PTR_RET(__force const void *ptr) |
| 56 | { | 56 | { |
| 57 | if (IS_ERR(ptr)) | 57 | if (IS_ERR(ptr)) |
| 58 | return PTR_ERR(ptr); | 58 | return PTR_ERR(ptr); |
