[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen: remove unused function ERR_CAST



commit 9d8c3bc887142762d0d223c70ed5be359b9eb35d
Author:     Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx>
AuthorDate: Tue Dec 19 12:05:13 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Dec 20 11:47:31 2023 +0100

    xen: remove unused function ERR_CAST
    
    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>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 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;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.