drm/appletbdrm: fix format character for size_t
Subsystems (3)
PATCH 1/1 drm/appletbdrm: fix format character for size_t
Use %zu for size_t instead of %lu to avoid failures on 32-bit builds:
error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’}
Fixes 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
Cc Kerem Karabay <[email protected]>
Cc Atharva Tiwari <[email protected]>
Cc Aditya Garg <[email protected]>
Cc Aun-Ali Zaidi <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Signed-off-by Jani Nikula <[email protected]>
--- drivers/gpu/drm/tiny/appletbdrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/tiny/appletbdrm.c +2 -2
@@ -167,7 +167,7 @@ static int appletbdrm_send_request(struct appletbdrm_device *adev, }if (actual_size != size) { -drm_err (drm,"Actual size (%d) doesn't match expected size (%lu)\n" , +drm_err (drm,"Actual size (%d) doesn't match expected size (%zu)\n" , actual_size, size);return -EIO ; }
@@ -208,7 +208,7 @@ static int appletbdrm_read_response(struct appletbdrm_device *adev, }if (actual_size != size) { -drm_err (drm,"Actual size (%d) doesn't match expected size (%lu)\n" , +drm_err (drm,"Actual size (%d) doesn't match expected size (%zu)\n" , actual_size, size);return -EBADMSG ; }
Signature · 1 line
2.39.5
Quoted 16 lines · Jani Nikula
Use %zu for
size_tinstead of %lu to avoid failures on 32-bit builds:error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’}
Fixes 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")Cc Kerem Karabay <[email protected]>Cc Atharva Tiwari <[email protected]>Cc Aditya Garg <[email protected]>Cc Aun-Ali Zaidi <[email protected]>Cc Thomas Zimmermann <[email protected]>Signed-off-by Jani Nikula <[email protected]>
Quoted 3 lines
---
drivers/gpu/drm/tiny/appletbdrm.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)
LGTM
Acked-by Aditya Garg <[email protected]>