aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ufs/swab.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ufs/swab.h b/fs/ufs/swab.h
index 1683d2bee614..a4340d0267bb 100644
--- a/fs/ufs/swab.h
+++ b/fs/ufs/swab.h
@@ -80,18 +80,18 @@ static inline void
80fs32_add(struct super_block *sbp, __fs32 *n, int d) 80fs32_add(struct super_block *sbp, __fs32 *n, int d)
81{ 81{
82 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) 82 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE)
83 *(__le32 *)n = cpu_to_le32(le32_to_cpu(*(__le32 *)n)+d); 83 le32_add_cpu((__le32 *)n, d);
84 else 84 else
85 *(__be32 *)n = cpu_to_be32(be32_to_cpu(*(__be32 *)n)+d); 85 be32_add_cpu((__be32 *)n, d);
86} 86}
87 87
88static inline void 88static inline void
89fs32_sub(struct super_block *sbp, __fs32 *n, int d) 89fs32_sub(struct super_block *sbp, __fs32 *n, int d)
90{ 90{
91 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) 91 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE)
92 *(__le32 *)n = cpu_to_le32(le32_to_cpu(*(__le32 *)n)-d); 92 le32_add_cpu((__le32 *)n, -d);
93 else 93 else
94 *(__be32 *)n = cpu_to_be32(be32_to_cpu(*(__be32 *)n)-d); 94 be32_add_cpu((__be32 *)n, -d);
95} 95}
96 96
97static inline u16 97static inline u16
@@ -116,18 +116,18 @@ static inline void
116fs16_add(struct super_block *sbp, __fs16 *n, int d) 116fs16_add(struct super_block *sbp, __fs16 *n, int d)
117{ 117{
118 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) 118 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE)
119 *(__le16 *)n = cpu_to_le16(le16_to_cpu(*(__le16 *)n)+d); 119 le16_add_cpu((__le16 *)n, d);
120 else 120 else
121 *(__be16 *)n = cpu_to_be16(be16_to_cpu(*(__be16 *)n)+d); 121 be16_add_cpu((__be16 *)n, d);
122} 122}
123 123
124static inline void 124static inline void
125fs16_sub(struct super_block *sbp, __fs16 *n, int d) 125fs16_sub(struct super_block *sbp, __fs16 *n, int d)
126{ 126{
127 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) 127 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE)
128 *(__le16 *)n = cpu_to_le16(le16_to_cpu(*(__le16 *)n)-d); 128 le16_add_cpu((__le16 *)n, -d);
129 else 129 else
130 *(__be16 *)n = cpu_to_be16(be16_to_cpu(*(__be16 *)n)-d); 130 be16_add_cpu((__be16 *)n, -d);
131} 131}
132 132
133#endif /* _UFS_SWAB_H */ 133#endif /* _UFS_SWAB_H */