diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-04-30 03:54:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:52 -0400 |
commit | 07132922aac0caf807c56b9c2a388954b357a8c4 (patch) | |
tree | b55a41ec3016ffdcfe54586b4b89c8bec214ce1a /fs | |
parent | e3592b12f507d2c12c883d9c18084b72a5710db3 (diff) |
sysv: [bl]e*_add_cpu conversion
replace all:
big/little_endian_variable = cpu_to_[bl]eX([bl]eX_to_cpu(big/little_endian_variable) +
expression_in_cpu_byteorder);
with:
[bl]eX_add_cpu(&big/little_endian_variable, expression_in_cpu_byteorder);
generated with semantic patch
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/sysv/sysv.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h index 42d51d1c05cd..38ebe3f85b3d 100644 --- a/fs/sysv/sysv.h +++ b/fs/sysv/sysv.h | |||
@@ -217,9 +217,9 @@ static inline __fs32 fs32_add(struct sysv_sb_info *sbi, __fs32 *n, int d) | |||
217 | if (sbi->s_bytesex == BYTESEX_PDP) | 217 | if (sbi->s_bytesex == BYTESEX_PDP) |
218 | *(__u32*)n = PDP_swab(PDP_swab(*(__u32*)n)+d); | 218 | *(__u32*)n = PDP_swab(PDP_swab(*(__u32*)n)+d); |
219 | else if (sbi->s_bytesex == BYTESEX_LE) | 219 | else if (sbi->s_bytesex == BYTESEX_LE) |
220 | *(__le32*)n = cpu_to_le32(le32_to_cpu(*(__le32*)n)+d); | 220 | le32_add_cpu((__le32 *)n, d); |
221 | else | 221 | else |
222 | *(__be32*)n = cpu_to_be32(be32_to_cpu(*(__be32*)n)+d); | 222 | be32_add_cpu((__be32 *)n, d); |
223 | return *n; | 223 | return *n; |
224 | } | 224 | } |
225 | 225 | ||
@@ -242,9 +242,9 @@ static inline __fs16 cpu_to_fs16(struct sysv_sb_info *sbi, __u16 n) | |||
242 | static inline __fs16 fs16_add(struct sysv_sb_info *sbi, __fs16 *n, int d) | 242 | static inline __fs16 fs16_add(struct sysv_sb_info *sbi, __fs16 *n, int d) |
243 | { | 243 | { |
244 | if (sbi->s_bytesex != BYTESEX_BE) | 244 | if (sbi->s_bytesex != BYTESEX_BE) |
245 | *(__le16*)n = cpu_to_le16(le16_to_cpu(*(__le16 *)n)+d); | 245 | le16_add_cpu((__le16 *)n, d); |
246 | else | 246 | else |
247 | *(__be16*)n = cpu_to_be16(be16_to_cpu(*(__be16 *)n)+d); | 247 | be16_add_cpu((__be16 *)n, d); |
248 | return *n; | 248 | return *n; |
249 | } | 249 | } |
250 | 250 | ||