From 88eb1663e0182821a3bdd45071f33c5ec0711dac Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 7 Feb 2008 00:15:26 -0800 Subject: [PATCH] --- yaml --- r: 83848 b: refs/heads/master c: d1bc8e95445224276d7896b8b08cbb0b28a0ca80 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/err.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2d02e1d1b68b..75800e768f55 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ae5e29798afa2b11a01fcb4fab8b58fee47fe155 +refs/heads/master: d1bc8e95445224276d7896b8b08cbb0b28a0ca80 diff --git a/trunk/include/linux/err.h b/trunk/include/linux/err.h index 1ab1d44f8d3b..ec87f3142bf3 100644 --- a/trunk/include/linux/err.h +++ b/trunk/include/linux/err.h @@ -34,6 +34,19 @@ static inline long IS_ERR(const void *ptr) return IS_ERR_VALUE((unsigned long)ptr); } +/** + * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type + * @ptr: The pointer to cast. + * + * Explicitly cast an error-valued pointer to another pointer type in such a + * way as to make it clear that's what's going on. + */ +static inline void *ERR_CAST(const void *ptr) +{ + /* cast away the const */ + return (void *) ptr; +} + #endif #endif /* _LINUX_ERR_H */