summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-04-11 12:32:25 +0200
committerChris Mason <clm@fb.com>2014-04-11 15:35:50 +0200
commite4fbaee29272533a242f117d18712e2974520d2c (patch)
tree69a9c2a98f4ec998bace41755a50949bf594ac17 /fs/btrfs
parentbtrfs: allow mounting btrfs subvolumes with different ro/rw options (diff)
downloadlinux-e4fbaee29272533a242f117d18712e2974520d2c.tar.xz
linux-e4fbaee29272533a242f117d18712e2974520d2c.zip
Btrfs: fix compile warnings on on avr32 platform
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/scrub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index aee909fc622b..68a5a26997bf 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -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)