NTFS: Re-fix sparse warnings in a more correct way, i.e. don't use an enum with
different types in it but #define the two constants instead. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
This commit is contained in:
Родитель
e8c2cd99a3
Коммит
e2fcc61ef0
|
@ -308,22 +308,19 @@ typedef le16 MFT_RECORD_FLAGS;
|
||||||
* The _LE versions are to be applied on little endian MFT_REFs.
|
* The _LE versions are to be applied on little endian MFT_REFs.
|
||||||
* Note: The _LE versions will return a CPU endian formatted value!
|
* Note: The _LE versions will return a CPU endian formatted value!
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
#define MFT_REF_MASK_CPU 0x0000ffffffffffffULL
|
||||||
MFT_REF_MASK_CPU = 0x0000ffffffffffffULL,
|
#define MFT_REF_MASK_LE const_cpu_to_le64(0x0000ffffffffffffULL)
|
||||||
MFT_REF_MASK_LE = const_cpu_to_le64(0x0000ffffffffffffULL),
|
|
||||||
} MFT_REF_CONSTS;
|
|
||||||
|
|
||||||
typedef u64 MFT_REF;
|
typedef u64 MFT_REF;
|
||||||
typedef le64 leMFT_REF;
|
typedef le64 leMFT_REF;
|
||||||
|
|
||||||
#define MK_MREF(m, s) ((MFT_REF)(((MFT_REF)(s) << 48) | \
|
#define MK_MREF(m, s) ((MFT_REF)(((MFT_REF)(s) << 48) | \
|
||||||
((MFT_REF)(m) & (u64)MFT_REF_MASK_CPU)))
|
((MFT_REF)(m) & MFT_REF_MASK_CPU)))
|
||||||
#define MK_LE_MREF(m, s) cpu_to_le64(MK_MREF(m, s))
|
#define MK_LE_MREF(m, s) cpu_to_le64(MK_MREF(m, s))
|
||||||
|
|
||||||
#define MREF(x) ((unsigned long)((x) & (u64)MFT_REF_MASK_CPU))
|
#define MREF(x) ((unsigned long)((x) & MFT_REF_MASK_CPU))
|
||||||
#define MSEQNO(x) ((u16)(((x) >> 48) & 0xffff))
|
#define MSEQNO(x) ((u16)(((x) >> 48) & 0xffff))
|
||||||
#define MREF_LE(x) ((unsigned long)(le64_to_cpu(x) & \
|
#define MREF_LE(x) ((unsigned long)(le64_to_cpu(x) & MFT_REF_MASK_CPU))
|
||||||
(u64)MFT_REF_MASK_CPU))
|
|
||||||
#define MSEQNO_LE(x) ((u16)((le64_to_cpu(x) >> 48) & 0xffff))
|
#define MSEQNO_LE(x) ((u16)((le64_to_cpu(x) >> 48) & 0xffff))
|
||||||
|
|
||||||
#define IS_ERR_MREF(x) (((x) & 0x0000800000000000ULL) ? 1 : 0)
|
#define IS_ERR_MREF(x) (((x) & 0x0000800000000000ULL) ? 1 : 0)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче