Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Gao Xiang and committed by
Greg Kroah-Hartman
ccd9c19c b8e076a6

+3 -5
+3 -5
drivers/staging/erofs/erofs_fs.h
··· 38 38 /* 80 */__u8 reserved2[48]; /* 128 bytes */ 39 39 } __packed; 40 40 41 - #define __EROFS_BIT(_prefix, _cur, _pre) enum { \ 42 - _prefix ## _cur ## _BIT = _prefix ## _pre ## _BIT + \ 43 - _prefix ## _pre ## _BITS } 44 - 45 41 /* 46 42 * erofs inode data mapping: 47 43 * 0 - inode plain without inline data A: ··· 54 58 EROFS_INODE_LAYOUT_INLINE, 55 59 EROFS_INODE_LAYOUT_MAX 56 60 }; 61 + 62 + /* bit definitions of inode i_advise */ 57 63 #define EROFS_I_VERSION_BITS 1 58 64 #define EROFS_I_DATA_MAPPING_BITS 3 59 65 60 66 #define EROFS_I_VERSION_BIT 0 61 - __EROFS_BIT(EROFS_I_, DATA_MAPPING, VERSION); 67 + #define EROFS_I_DATA_MAPPING_BIT 1 62 68 63 69 struct erofs_inode_v1 { 64 70 /* 0 */__le16 i_advise;