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:
Andy Grover
2020-10-02 12:08:07 -07:00
committed by Zach Brown
parent 6b1dd980f0
commit 8bd6646d9a

View File

@@ -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) |