Skip to content

Commit

Permalink
Btrfs: fix compile warnings on on avr32 platform
Browse files Browse the repository at this point in the history
fs/btrfs/scrub.c: In function 'get_raid56_logic_offset':
fs/btrfs/scrub.c:2269: warning: comparison of distinct pointer types lacks a cast
fs/btrfs/scrub.c:2269: warning: right shift count >= width of type
fs/btrfs/scrub.c:2269: warning: passing argument 1 of '__div64_32' from incompatible pointer type

Since @rot is an int type, we should not use do_div(), fix it.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Wang Shilong authored and Chris Mason committed Apr 11, 2014
1 parent 0723a04 commit e4fbaee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,7 @@ static int get_raid56_logic_offset(u64 physical, int num,
rot = do_div(stripe_nr, map->num_stripes);
/* calculate which stripe this data locates */
rot += i;
stripe_index = do_div(rot, map->num_stripes);
stripe_index = rot % map->num_stripes;
if (stripe_index == num)
return 0;
if (stripe_index < num)
Expand Down

0 comments on commit e4fbaee

Please sign in to comment.