Commit 9e902df6be2cb7444e5a0f7e2e72bcbf3b978f3e
Committed by
Linus Torvalds
1 parent
78e917d59c
reiserfs: le*_add_cpu conversion
replace all: little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) + expression_in_cpu_byteorder); with: leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder); generated with semantic patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Chris Mason <chris.mason@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 3 additions and 5 deletions Side-by-side Diff
fs/reiserfs/objectid.c
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | if (objectid_to_release == le32_to_cpu(map[i])) { |
115 | 115 | /* This incrementation unallocates the objectid. */ |
116 | 116 | //map[i]++; |
117 | - map[i] = cpu_to_le32(le32_to_cpu(map[i]) + 1); | |
117 | + le32_add_cpu(&map[i], 1); | |
118 | 118 | |
119 | 119 | /* Did we unallocate the last member of an odd sequence, and can shrink oids? */ |
120 | 120 | if (map[i] == map[i + 1]) { |
... | ... | @@ -138,8 +138,7 @@ |
138 | 138 | /* size of objectid map is not changed */ |
139 | 139 | if (objectid_to_release + 1 == le32_to_cpu(map[i + 1])) { |
140 | 140 | //objectid_map[i+1]--; |
141 | - map[i + 1] = | |
142 | - cpu_to_le32(le32_to_cpu(map[i + 1]) - 1); | |
141 | + le32_add_cpu(&map[i + 1], -1); | |
143 | 142 | return; |
144 | 143 | } |
145 | 144 |
fs/reiserfs/stree.c
... | ... | @@ -1419,8 +1419,7 @@ |
1419 | 1419 | |
1420 | 1420 | inode_generation = |
1421 | 1421 | &REISERFS_SB(th->t_super)->s_rs->s_inode_generation; |
1422 | - *inode_generation = | |
1423 | - cpu_to_le32(le32_to_cpu(*inode_generation) + 1); | |
1422 | + le32_add_cpu(inode_generation, 1); | |
1424 | 1423 | } |
1425 | 1424 | /* USE_INODE_GENERATION_COUNTER */ |
1426 | 1425 | #endif |