diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-06-28 02:43:50 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-07-14 01:37:02 -0400 |
commit | bbaaf53808c778bda24f8245a440c5ceacc1a37d (patch) | |
tree | 8539cec4777f2a20681bf46c224907f661923a39 /fs/xfs/xfs_dir2_data.h | |
parent | 54aa8e26e90da882b145fcd33ed752431d6b318b (diff) |
[XFS] Reduce shouting by removing unnecessary macros from dir2 code.
SGI-PV: 966505
SGI-Modid: xfs-linux-melb:xfs-kern:28947a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_data.h')
-rw-r--r-- | fs/xfs/xfs_dir2_data.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/xfs/xfs_dir2_data.h b/fs/xfs/xfs_dir2_data.h index c94c9099cfb1..b816e0252739 100644 --- a/fs/xfs/xfs_dir2_data.h +++ b/fs/xfs/xfs_dir2_data.h | |||
@@ -44,7 +44,7 @@ struct xfs_trans; | |||
44 | #define XFS_DIR2_DATA_SPACE 0 | 44 | #define XFS_DIR2_DATA_SPACE 0 |
45 | #define XFS_DIR2_DATA_OFFSET (XFS_DIR2_DATA_SPACE * XFS_DIR2_SPACE_SIZE) | 45 | #define XFS_DIR2_DATA_OFFSET (XFS_DIR2_DATA_SPACE * XFS_DIR2_SPACE_SIZE) |
46 | #define XFS_DIR2_DATA_FIRSTDB(mp) \ | 46 | #define XFS_DIR2_DATA_FIRSTDB(mp) \ |
47 | XFS_DIR2_BYTE_TO_DB(mp, XFS_DIR2_DATA_OFFSET) | 47 | xfs_dir2_byte_to_db(mp, XFS_DIR2_DATA_OFFSET) |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * Offsets of . and .. in data space (always block 0) | 50 | * Offsets of . and .. in data space (always block 0) |
@@ -52,9 +52,9 @@ struct xfs_trans; | |||
52 | #define XFS_DIR2_DATA_DOT_OFFSET \ | 52 | #define XFS_DIR2_DATA_DOT_OFFSET \ |
53 | ((xfs_dir2_data_aoff_t)sizeof(xfs_dir2_data_hdr_t)) | 53 | ((xfs_dir2_data_aoff_t)sizeof(xfs_dir2_data_hdr_t)) |
54 | #define XFS_DIR2_DATA_DOTDOT_OFFSET \ | 54 | #define XFS_DIR2_DATA_DOTDOT_OFFSET \ |
55 | (XFS_DIR2_DATA_DOT_OFFSET + XFS_DIR2_DATA_ENTSIZE(1)) | 55 | (XFS_DIR2_DATA_DOT_OFFSET + xfs_dir2_data_entsize(1)) |
56 | #define XFS_DIR2_DATA_FIRST_OFFSET \ | 56 | #define XFS_DIR2_DATA_FIRST_OFFSET \ |
57 | (XFS_DIR2_DATA_DOTDOT_OFFSET + XFS_DIR2_DATA_ENTSIZE(2)) | 57 | (XFS_DIR2_DATA_DOTDOT_OFFSET + xfs_dir2_data_entsize(2)) |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Structures. | 60 | * Structures. |
@@ -123,7 +123,6 @@ typedef struct xfs_dir2_data { | |||
123 | /* | 123 | /* |
124 | * Size of a data entry. | 124 | * Size of a data entry. |
125 | */ | 125 | */ |
126 | #define XFS_DIR2_DATA_ENTSIZE(n) xfs_dir2_data_entsize(n) | ||
127 | static inline int xfs_dir2_data_entsize(int n) | 126 | static inline int xfs_dir2_data_entsize(int n) |
128 | { | 127 | { |
129 | return (int)roundup(offsetof(xfs_dir2_data_entry_t, name[0]) + (n) + \ | 128 | return (int)roundup(offsetof(xfs_dir2_data_entry_t, name[0]) + (n) + \ |
@@ -133,19 +132,16 @@ static inline int xfs_dir2_data_entsize(int n) | |||
133 | /* | 132 | /* |
134 | * Pointer to an entry's tag word. | 133 | * Pointer to an entry's tag word. |
135 | */ | 134 | */ |
136 | #define XFS_DIR2_DATA_ENTRY_TAG_P(dep) xfs_dir2_data_entry_tag_p(dep) | ||
137 | static inline __be16 * | 135 | static inline __be16 * |
138 | xfs_dir2_data_entry_tag_p(xfs_dir2_data_entry_t *dep) | 136 | xfs_dir2_data_entry_tag_p(xfs_dir2_data_entry_t *dep) |
139 | { | 137 | { |
140 | return (__be16 *)((char *)dep + | 138 | return (__be16 *)((char *)dep + |
141 | XFS_DIR2_DATA_ENTSIZE(dep->namelen) - sizeof(__be16)); | 139 | xfs_dir2_data_entsize(dep->namelen) - sizeof(__be16)); |
142 | } | 140 | } |
143 | 141 | ||
144 | /* | 142 | /* |
145 | * Pointer to a freespace's tag word. | 143 | * Pointer to a freespace's tag word. |
146 | */ | 144 | */ |
147 | #define XFS_DIR2_DATA_UNUSED_TAG_P(dup) \ | ||
148 | xfs_dir2_data_unused_tag_p(dup) | ||
149 | static inline __be16 * | 145 | static inline __be16 * |
150 | xfs_dir2_data_unused_tag_p(xfs_dir2_data_unused_t *dup) | 146 | xfs_dir2_data_unused_tag_p(xfs_dir2_data_unused_t *dup) |
151 | { | 147 | { |