Re: [PATCH v2] Btrfs: use do_div to avoid compile errors on 32bit box

2011-08-20 Thread Josef Bacik
On 08/19/2011 10:17 PM, Liu Bo wrote: When doing div operation of u64 type, we need to be careful and use do_div to avoid compile ERROR on 32bit box: ERROR: __udivdi3 [fs/btrfs/btrfs.ko] undefined! make[1]: *** [__modpost] Error 1 v1-v2: - fix stupid do_div() with type signed integer.

Re: [PATCH v2] Btrfs: use do_div to avoid compile errors on 32bit box

2011-08-20 Thread Linus Torvalds
On Sat, Aug 20, 2011 at 5:21 AM, Josef Bacik jo...@redhat.com wrote: I think Linus was less complaining about how you're dividing here and more about the fact that you are.  A divide by 2 is the same as a 1.  I'll send a patch to fix this.  Thanks, Indeed. A single-bit 64-bit double shift

[PATCH v2] Btrfs: use do_div to avoid compile errors on 32bit box

2011-08-19 Thread Liu Bo
When doing div operation of u64 type, we need to be careful and use do_div to avoid compile ERROR on 32bit box: ERROR: __udivdi3 [fs/btrfs/btrfs.ko] undefined! make[1]: *** [__modpost] Error 1 v1-v2: - fix stupid do_div() with type signed integer. Signed-off-by: Liu Bo liubo2...@cn.fujitsu.com