mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-09 13:23:14 +00:00
scoutfs-utils: avoid redeclarations of __[be,le][16,32,64] in sparse.h
dev.c includes linux/fs.h which includes linux/types.h, which defines these types, __be16 etc. These are also defined in sparse.h, but I don't think these are needed. Definitions in linux/types.h includes stuff to set attr(bitwise) if __CHECKER__ is defined, so we can remove __sp_biwise. Signed-off-by: Andy Grover <agrover@versity.com>
This commit is contained in:
@@ -3,12 +3,11 @@
|
||||
|
||||
#include <endian.h>
|
||||
#include <stdint.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef __CHECKER__
|
||||
# undef __force
|
||||
# define __force __attribute__((force))
|
||||
# undef __sp_biwise
|
||||
# define __sp_biwise __attribute__((bitwise))
|
||||
/* sparse seems to get confused by some builtins */
|
||||
extern int __builtin_ia32_rdrand64_step(unsigned long long *);
|
||||
extern unsigned int __builtin_ia32_crc32di(unsigned int, unsigned long long);
|
||||
@@ -18,7 +17,6 @@ extern unsigned int __builtin_ia32_crc32qi(unsigned int, unsigned char);
|
||||
|
||||
#else
|
||||
# define __force
|
||||
# define __sp_biwise
|
||||
#endif
|
||||
|
||||
typedef unsigned char u8;
|
||||
@@ -35,13 +33,6 @@ typedef s32 __s32;
|
||||
typedef u64 __u64;
|
||||
typedef s64 __s64;
|
||||
|
||||
typedef u16 __sp_biwise __le16;
|
||||
typedef u16 __sp_biwise __be16;
|
||||
typedef u32 __sp_biwise __le32;
|
||||
typedef u32 __sp_biwise __be32;
|
||||
typedef u64 __sp_biwise __le64;
|
||||
typedef u64 __sp_biwise __be64;
|
||||
|
||||
static inline u16 ___swab16(u16 x)
|
||||
{
|
||||
return ((x & (u16)0x00ffU) << 8) |
|
||||
|
||||
Reference in New Issue
Block a user