[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 5/6] xen: remove unused function ERR_CAST
From: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx> Function ERR_CAST contains a violation of MISRA C:2012 Rule 11.8, whose headline states: "A conversion shall not remove any const, volatile or _Atomic qualification from the type pointed to by a pointer". Since the function has no users, it is appropriate to remove it. Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx> Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx> --- Commit introduced in v2. --- xen/include/xen/err.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/xen/include/xen/err.h b/xen/include/xen/err.h index 2f29b57d28..cbdd1bf7f8 100644 --- a/xen/include/xen/err.h +++ b/xen/include/xen/err.h @@ -36,19 +36,6 @@ static inline long __must_check IS_ERR_OR_NULL(const void *ptr) return !ptr || 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 * __must_check ERR_CAST(const void *ptr) -{ - /* cast away the const */ - return (void *)ptr; -} - static inline int __must_check PTR_RET(const void *ptr) { return IS_ERR(ptr) ? PTR_ERR(ptr) : 0; -- 2.40.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |