[Skiboot] [PATCH 02/36] Properly annotate types.h for sparse

Stewart Smith stewart at linux.vnet.ibm.com
Tue Nov 10 15:17:56 AEDT 2015


This way we don't get hundreds of false warnings from sparse r.e. endian

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 include/types.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/types.h b/include/types.h
index 36dc81d92247..07a9db6299da 100644
--- a/include/types.h
+++ b/include/types.h
@@ -17,11 +17,12 @@
 #ifndef __TYPES_H
 #define __TYPES_H
 #include <ccan/short_types/short_types.h>
+#include <ccan/endian/endian.h>
 
 /* These are currently just for clarity, but we could apply sparse. */
-typedef u16 __be16;
-typedef u32 __be32;
-typedef u64 __be64;
+typedef beint16_t __be16;
+typedef beint32_t __be32;
+typedef beint64_t __be64;
 
 #endif /* __TYPES_H */
 
-- 
2.1.4



More information about the Skiboot mailing list