staging: erofs: remove __EROFS_BIT
It's better to use pre-calculated values to make on-disk definition more straight-forward and human-readable. Since there is the only one user, let's remove __EROFS_BIT entirely. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b8e076a6ef
commit
ccd9c19c7a
1 changed files with 3 additions and 5 deletions
|
@ -38,10 +38,6 @@ struct erofs_super_block {
|
||||||
/* 80 */__u8 reserved2[48]; /* 128 bytes */
|
/* 80 */__u8 reserved2[48]; /* 128 bytes */
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
#define __EROFS_BIT(_prefix, _cur, _pre) enum { \
|
|
||||||
_prefix ## _cur ## _BIT = _prefix ## _pre ## _BIT + \
|
|
||||||
_prefix ## _pre ## _BITS }
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* erofs inode data mapping:
|
* erofs inode data mapping:
|
||||||
* 0 - inode plain without inline data A:
|
* 0 - inode plain without inline data A:
|
||||||
|
@ -58,11 +54,13 @@ enum {
|
||||||
EROFS_INODE_LAYOUT_INLINE,
|
EROFS_INODE_LAYOUT_INLINE,
|
||||||
EROFS_INODE_LAYOUT_MAX
|
EROFS_INODE_LAYOUT_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* bit definitions of inode i_advise */
|
||||||
#define EROFS_I_VERSION_BITS 1
|
#define EROFS_I_VERSION_BITS 1
|
||||||
#define EROFS_I_DATA_MAPPING_BITS 3
|
#define EROFS_I_DATA_MAPPING_BITS 3
|
||||||
|
|
||||||
#define EROFS_I_VERSION_BIT 0
|
#define EROFS_I_VERSION_BIT 0
|
||||||
__EROFS_BIT(EROFS_I_, DATA_MAPPING, VERSION);
|
#define EROFS_I_DATA_MAPPING_BIT 1
|
||||||
|
|
||||||
struct erofs_inode_v1 {
|
struct erofs_inode_v1 {
|
||||||
/* 0 */__le16 i_advise;
|
/* 0 */__le16 i_advise;
|
||||||
|
|
Loading…
Add table
Reference in a new issue