ext3: replace all adds to little endians variables with le*_add_cpu
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); sparse didn't generate any new warning with this patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: David Chinner <dgc@sgi.com> Cc: Timothy Shimmin <tes@sgi.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
8b5f688368
commit
50e8a2890e
@@ -630,9 +630,7 @@ do_more:
|
||||
jbd_unlock_bh_state(bitmap_bh);
|
||||
|
||||
spin_lock(sb_bgl_lock(sbi, block_group));
|
||||
desc->bg_free_blocks_count =
|
||||
cpu_to_le16(le16_to_cpu(desc->bg_free_blocks_count) +
|
||||
group_freed);
|
||||
le16_add_cpu(&desc->bg_free_blocks_count, group_freed);
|
||||
spin_unlock(sb_bgl_lock(sbi, block_group));
|
||||
percpu_counter_add(&sbi->s_freeblocks_counter, count);
|
||||
|
||||
@@ -1696,8 +1694,7 @@ allocated:
|
||||
ret_block, goal_hits, goal_attempts);
|
||||
|
||||
spin_lock(sb_bgl_lock(sbi, group_no));
|
||||
gdp->bg_free_blocks_count =
|
||||
cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)-num);
|
||||
le16_add_cpu(&gdp->bg_free_blocks_count, -num);
|
||||
spin_unlock(sb_bgl_lock(sbi, group_no));
|
||||
percpu_counter_sub(&sbi->s_freeblocks_counter, num);
|
||||
|
||||
|
Reference in New Issue
Block a user