2018-01-26 18:11:16

by Eric Whitney

[permalink] [raw]
Subject: [PATCH] ext4: modify cluster macro parameter names for consistency

Not all the parameter names used to refer to ext4_sb_info structs in
the cluster-related macro definitions are consistent. Some use the
name "s" rather than "sbi" when operating on a component of an
ext4_sb_info struct. Use of the latter helps comprehensibility, since
the name "sbi" is commonly used for instances of ext4_sb_info in ext4.

Signed-off-by: Eric Whitney <[email protected]>
---
fs/ext4/ext4.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 3241475a1733..7705d7f36ccb 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -279,15 +279,15 @@ struct ext4_io_submit {
#define EXT4_NUM_B2C(sbi, blks) (((blks) + (sbi)->s_cluster_ratio - 1) >> \
(sbi)->s_cluster_bits)
/* Mask out the low bits to get the starting block of the cluster */
-#define EXT4_PBLK_CMASK(s, pblk) ((pblk) & \
- ~((ext4_fsblk_t) (s)->s_cluster_ratio - 1))
-#define EXT4_LBLK_CMASK(s, lblk) ((lblk) & \
- ~((ext4_lblk_t) (s)->s_cluster_ratio - 1))
+#define EXT4_PBLK_CMASK(sbi, pblk) ((pblk) & \
+ ~((ext4_fsblk_t)(sbi)->s_cluster_ratio - 1))
+#define EXT4_LBLK_CMASK(sbi, lblk) ((lblk) & \
+ ~((ext4_lblk_t) (sbi)->s_cluster_ratio - 1))
/* Get the cluster offset */
-#define EXT4_PBLK_COFF(s, pblk) ((pblk) & \
- ((ext4_fsblk_t) (s)->s_cluster_ratio - 1))
-#define EXT4_LBLK_COFF(s, lblk) ((lblk) & \
- ((ext4_lblk_t) (s)->s_cluster_ratio - 1))
+#define EXT4_PBLK_COFF(sbi, pblk) ((pblk) & \
+ ((ext4_fsblk_t) (sbi)->s_cluster_ratio - 1))
+#define EXT4_LBLK_COFF(sbi, lblk) ((lblk) & \
+ ((ext4_lblk_t) (sbi)->s_cluster_ratio - 1))

/*
* Structure of a blocks group descriptor
--
2.11.0