]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs: zfs: fix illegal use of fp
authorAlejandro Mery <amery@geeks.cl>
Wed, 31 Oct 2012 08:21:33 +0000 (08:21 +0000)
committerAnatolij Gustschin <agust@denx.de>
Wed, 14 Nov 2012 12:18:41 +0000 (13:18 +0100)
the upcoming sunxi (allwinner a10/a13) platform enables zfs
by default, and using linaro's hf -msoft-float makes the build
fail because this u64 division.

Signed-off-by: Alejandro Mery <amery@geeks.cl>
Acked-by: Stefan Roese <sr@denx.de>
fs/zfs/zfs.c

index 2db45b19286a081c030b3f43cad85920b38b81d7..1b73244c004732e3de0edbe717b650c3992e4908 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/ctype.h>
 #include <asm/byteorder.h>
 #include "zfs_common.h"
+#include "div64.h"
 
 block_dev_desc_t *zfs_dev_desc;
 
@@ -2115,7 +2116,8 @@ zfs_read(zfs_file_t file, char *buf, uint64_t len)
                /*
                 * Find requested blkid and the offset within that block.
                 */
-               uint64_t blkid = (file->offset + red) /  blksz;
+               uint64_t blkid = file->offset + red;
+               blkid = do_div(blkid, blksz);
                free(data->file_buf);
                data->file_buf = 0;