drm/bridge: lt8713sx: avoid 64-bit division
Subsystems (3)
PATCH 1/1 drm/bridge: lt8713sx: avoid 64-bit division
From: Arnd Bergmann <[email protected]>
On 32-bit kernels, 64-bit integers cannot be passed to the division operator:
ld.lld-22: error: undefined symbol: __aeabi_uldivmod
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
lontium-lt8713sx.c
drivers/gpu/drm/bridge/lontium-lt8713sx.o:(lt8713sx_firmware_store) in archive vmlinux.a
Since this is a constant number used to divide a size_t, just change the type to that as well.
--- drivers/gpu/drm/bridge/lontium-lt8713sx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/lontium-lt8713sx.c +1 -1
@@ -100,7 +100,7 @@ static void lt8713sx_i2c_disable(struct lt8713sx *lt8713sx)static int lt8713sx_prepare_firmware_data (struct lt8713sx *lt8713sx) {int ret =0 ; -u64 sz_12k =12 *SZ_1K ; +size_t sz_12k =12 *SZ_1K ; ret =request_firmware (<8713sx->fw,FW_FILE , lt8713sx->dev);if (ret <0 ) {
Signature · 1 line
2.39.5
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
On 32-bit kernels, 64-bit integers cannot be passed to the division operator:
ld.lld-22: error: undefined symbol:
__aeabi_uldivmodQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
lontium-lt8713sx.c
drivers/gpu/drm/bridge/lontium-lt8713sx.o:(lt8713sx_firmware_store) in archive vmlinux.aSince this is a constant number used to divide a
size_t, just change the type to that as well.
And if the firmware size doesn't fit 32bits, we are in trouble anyway.
Quoted 7 lines
Fixes 4037c6adc1f9 ("drm/bridge: add support for lontium lt8713sx bridge driver")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/bridge/lontium-lt8713sx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
With best wishes Dmitry
Dmitry Baryshkov
AppliedQuoted 10 lines · Arnd Bergmann
On 32-bit kernels, 64-bit integers cannot be passed to the division operator:
ld.lld-22: error: undefined symbol:
__aeabi_uldivmodQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
lontium-lt8713sx.c
drivers/gpu/drm/bridge/lontium-lt8713sx.o:(lt8713sx_firmware_store) in archive vmlinux.aSince this is a constant number used to divide a
size_t, just change the type to that as well.[...]
Applied to drm-misc-next, thanks!
[1/1] drm/bridge: lt8713sx: avoid 64-bit division
commit: c196276f7809ac89743e6de61262c1b4b84f78d0
Best regards,
Signature · 2 lines
With best wishes Dmitry