diff options
| author | Maurice Hieronymus <mhi@mailbox.org> | 2026-06-05 09:03:59 +0200 |
|---|---|---|
| committer | Uwe Kleine-König <ukleinek@kernel.org> | 2026-06-05 14:03:00 +0200 |
| commit | 6f9b73071c15001530e6697491b6db1bf639f4c7 (patch) | |
| tree | fd00f891537622cca69f876a202c77180501f69f /scripts/Makefile.thinlto | |
| parent | 5b5e33c44a491d5b5e019f527e028bd567a226fa (diff) | |
pwm: th1520: Remove requirement for mul_u64_u64_div_u64_roundup
The cycle register is always u32, so cycles_to_ns() can take a u32
instead of a u64. With that narrowing, cycles * NSEC_PER_SEC is at most
u32::MAX * 1e9 (~4.3e18), which fits in u64 without overflow. The
saturating arithmetic is therefore no longer needed, and the ceiling
division can use Rust's u64::div_ceil() directly instead of the
open-coded numerator/denominator form.
This also drops the TODO referring to a future
mul_u64_u64_div_u64_roundup kernel helper, which is no longer required.
Reviewed-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Link: https://patch.msgid.link/20260605-pwm-th1520-fix-v2-1-5921e3a595f7@mailbox.org
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
