Commit e4fbaee2 authored by Wang Shilong's avatar Wang Shilong Committed by Chris Mason
Browse files

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: default avatarkbuild test robot <>
Signed-off-by: default avatarWang Shilong <>
Signed-off-by: default avatarChris Mason <>
parent 0723a047
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment