From patchwork Thu Jan 8 18:51:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1342 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898334; bh=8VUcyhTeRzwqeGFa0TweYiB16Ray7VE/9q4tk4XNSEs=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=fTnkGbxt79+ueS+ZtJ1acyVvOqE34+wy5Tbi3pRltYqH8hVhVSNpBTFo7PdntkCoh cC9oAGaz5GIKgIIuUn3+/vEfv9AU0NIcbfiRpAT/tY03Z4ndAqnAGX/dJ+4+5tyHxl mZgHTmqvFNL3ldGnte9UygZKdISRSRmBS10md4tzwkiVTSCxGSRYZHvS9r6fmO55K4 2Tn5qFr6+DXmus6JWw5cbnK4RNl/hYSHWoPoabjFnCa6CJDP87q2LGV60V7EqI7+X7 d9+L59ClsQvXujf/aH0d0FdQ10HWfNT3o2EhaJgZjxgmzWmefcDxTN+cxv6xksss2U lyN7ls1T4ua7A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 147BC691C8 for ; Thu, 8 Jan 2026 11:52:14 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id lSB8wWhombDO for ; Thu, 8 Jan 2026 11:52:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898334; bh=8VUcyhTeRzwqeGFa0TweYiB16Ray7VE/9q4tk4XNSEs=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=fTnkGbxt79+ueS+ZtJ1acyVvOqE34+wy5Tbi3pRltYqH8hVhVSNpBTFo7PdntkCoh cC9oAGaz5GIKgIIuUn3+/vEfv9AU0NIcbfiRpAT/tY03Z4ndAqnAGX/dJ+4+5tyHxl mZgHTmqvFNL3ldGnte9UygZKdISRSRmBS10md4tzwkiVTSCxGSRYZHvS9r6fmO55K4 2Tn5qFr6+DXmus6JWw5cbnK4RNl/hYSHWoPoabjFnCa6CJDP87q2LGV60V7EqI7+X7 d9+L59ClsQvXujf/aH0d0FdQ10HWfNT3o2EhaJgZjxgmzWmefcDxTN+cxv6xksss2U lyN7ls1T4ua7A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 038C4691BF for ; Thu, 8 Jan 2026 11:52:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898332; bh=wSIqAGeWMOAut3rGzLaVLQiHWyRetaQGXDIa6EvGNM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EtYBAVq3GWH3myOe9ozTLsbb7pzceVJXsdFYUhAYcn/6NlnuT+vahskmaw4ia0crt jPBgzZbXIt1hYcBU3ZFfpdnl5l2H5GW5EcogY+kmYzGYDdIu+N0oEmbtptIL4CMr3V apciW/3O+YPeseBB9h6zcd9vYQcExBpjmelQm5/cFIxWn/fECS4jS4VdjWXybzuS10 owF2gnWShOk5m5NJ5xRuiskyXjB0aEc3RBVwtsv6O7VZ9n2bau3boC25Mim/eeZhv4 GvOVpxf/InC8EX0nD/pmqyjwDd5y7Bsz7EFTHsMFwk5U9j34+i3jzef9R2dasFMuZA WRzUQq43b4rNQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0F9B6691BF; Thu, 8 Jan 2026 11:52:12 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id YtqwqJ-B30VQ; Thu, 8 Jan 2026 11:52:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898328; bh=LOmYPSMKV/lM4E2fYeFmaBUeUGKArBCqjX5Tabzngh4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mu0K/ag8ohIcsS30A4SQxz2ekWMqA3iGig3WXA0wlwVbJpQVOPDsTANnPywbfQMjU KuItGh08jNiEsbeTquduLL6KY5NFlYzcyaPGIQVoWg5SB1X+g0hZ0/UyyqvkhCL8Vu FKKtrawJaRVhGv0QQDlkV2qMjtJikTMnMAAFagsILeQe6TPZINlRiyWvCPEh30gxmM GceTzC/E9+dAXgAxwYunr5cEAmO285Rv4ai86370ggnNGn8Nhp4Hil4msrlmPu0Zug +BGF6bq1huKlD+Tyviw6U5MCWWMDytkJArC3Uxwjlb3vzqqgdfeSh+N1wbtZJGFBmW cGU9K2Lzqm69w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id B879469128; Thu, 8 Jan 2026 11:52:07 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 8 Jan 2026 11:51:16 -0700 Message-ID: <20260108185149.1995917-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260108185149.1995917-1-sjg@u-boot.org> References: <20260108185149.1995917-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 7BKPI6YE7LWYYUJBU7HKSCVVJ3X67CRR X-Message-ID-Hash: 7BKPI6YE7LWYYUJBU7HKSCVVJ3X67CRR X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/21] ext4l: Use div64.h instead of defining locally List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass 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 --- 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 #include /* Real rbtree implementation */ #include /* For crc32() used by crc32_be */ +#include /* * 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)