]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nfs: fix do_div() warning by instead using sector_div()
authorHelge Deller <deller@gmx.de>
Mon, 2 Dec 2013 18:59:31 +0000 (19:59 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 4 Dec 2013 17:57:37 +0000 (12:57 -0500)
commit3873d064b8538686bbbd4b858dc8a07db1f7f43a
tree098e1f679fc9d76db19624ad7a25efddd7977c6e
parentcd7b996aa6cafe520dd987b12694fd8af4278466
nfs: fix do_div() warning by instead using sector_div()

When compiling a 32bit kernel with CONFIG_LBDAF=n the compiler complains like
shown below.  Fix this warning by instead using sector_div() which is provided
by the kernel.h header file.

fs/nfs/blocklayout/extents.c: In function ‘normalize’:
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast [enabled by default]
fs/nfs/blocklayout/extents.c:47:13: note: in expansion of macro ‘do_div’
nfs/blocklayout/extents.c:47:2: warning: right shift count >= width of type [enabled by default]
fs/nfs/blocklayout/extents.c:47:2: warning: passing argument 1 of ‘__div64_32’ from incompatible pointer type [enabled by default]
include/asm-generic/div64.h:35:17: note: expected ‘uint64_t *’ but argument is of type ‘sector_t *’
 extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/blocklayout/extents.c