Re: [PATCH 3/5] lib: div64: inline __iter_div_u64_rem() into its only user
Simon Glass <[email protected]> Wed, 5 Aug 2026 15:58:52 -0600
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <CAFLszTjCk=uYhSbvtwBog_7BCfuUjCLxiUDJc+bhVZjNb7iJag__20834.0346509189$1785967169$gmane$org@mail.gmail.com> |
On 2026-07-30T18:40:37, Alexey Charkov <[email protected]> wrote: > lib: div64: inline __iter_div_u64_rem() into its only user > > __iter_div_u64_rem() is only split out in Linux for its vDSO header, which > has no use in U-Boot. Inline the body of the helper directly into its only > user, which is the iter_div_u64_rem() wrapper in this same file, and drop > the static inline, so that a subsequent resync of include/linux/math64.h > against Linux does not have to carry an exception for it. > > include/vdso/math64.h is deliberately not created: its only other resident, > mul_u64_u32_add_u64_shr(), has no U-Boot user. > > No functional change: the generated code is identical, verified by > comparing objdump -d of lib/div64.o before and after for > evb-rk3288-rk808_defconfig. The compiler was already inlining the sole > call. > > iter_div_u64_rem() itself has no in-tree callers either, but it is > upstream API and is left in place. > > Signed-off-by: Alexey Charkov <[email protected]> > > include/linux/math64.h | 19 ------------------- > lib/div64.c | 17 ++++++++++++++++- > 2 files changed, 16 insertions(+), 20 deletions(-) Reviewed-by: Simon Glass <[email protected]>