From: Simon Glass <simon.glass@canonical.com> U-Boot has a do_div() macro which is supported on most boards. Use that instead of defining a new one. Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index c013b9605a4..04b76af7f09 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -36,6 +36,7 @@ #include <linux/seq_file.h> #include <linux/rbtree.h> /* Real rbtree implementation */ #include <u-boot/crc.h> /* For crc32() used by crc32_be */ +#include <div64.h> /* * Enable ext4_msg() and other diagnostic macros to pass full messages. @@ -439,15 +440,6 @@ int __ext4_xattr_set_credits(struct super_block *sb, struct inode *inode, #define sb_issue_zeroout(sb, blk, num, gfp) ({ (void)(sb); (void)(blk); (void)(num); (void)(gfp); 0; }) #define blkdev_issue_flush(bdev) ({ (void)(bdev); 0; }) -/* do_div - divide u64 by u32 */ -#define do_div(n, base) ({ \ - unsigned int __base = (base); \ - unsigned int __rem; \ - __rem = ((unsigned long long)(n)) % __base; \ - (n) = ((unsigned long long)(n)) / __base; \ - __rem; \ -}) - /* Inode locking - stubs */ #define inode_is_locked(i) (1) #define i_size_write(i, s) do { (i)->i_size = (s); } while (0) -- 2.43.0