Commit 19ab53e
Steve Dunnagan
i2c: mlxbf: avoid 64-bit division
JIRA: https://issues.redhat.com/browse/RHEL-103885
commit 2b28054
Author: Arnd Bergmann <arnd@arndb.de>
Date: Tue May 20 17:25:45 2025 +0200
i2c: mlxbf: avoid 64-bit division
The 64-bit division in mlxbf_i2c_get_ticks() causes link failures
when compile-testing on 32-bit machines:
ERROR: modpost: "__udivdi3" [drivers/i2c/busses/i2c-mlxbf.ko] undefined!
Change this to a div_u64(), which should replace the constant division
with a a multiply/shift combination in the mlxbf_i2c_get_ticks().
The frequency calculation functions require a slow library call but
should be used much rarer.
Fixes: 0538590 ("i2c: mlxbf: Allow build with COMPILE_TEST")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250520152600.1975628-1-arnd@kernel.org
Signed-off-by: Andi Shyti <andi@smida.it>
(cherry picked from commit 2b28054)
Signed-off-by: Steve Dunnagan <sdunnaga@redhat.com>1 parent 97f71fe commit 19ab53e
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
1086 | | - | |
| 1086 | + | |
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
| |||
1460 | 1460 | | |
1461 | 1461 | | |
1462 | 1462 | | |
1463 | | - | |
1464 | 1463 | | |
1465 | | - | |
| 1464 | + | |
1466 | 1465 | | |
1467 | 1466 | | |
1468 | 1467 | | |
| |||
1491 | 1490 | | |
1492 | 1491 | | |
1493 | 1492 | | |
1494 | | - | |
1495 | 1493 | | |
1496 | | - | |
| 1494 | + | |
1497 | 1495 | | |
1498 | 1496 | | |
1499 | 1497 | | |
| |||
0 commit comments