Skip to content

Commit d28b9d2

Browse files
JoseExpositotdz
authored andcommitted
drm/tests: Fix endian warning
When compiling with sparse enabled, this warning is thrown: warning: incorrect type in argument 2 (different base types) expected restricted __le32 const [usertype] *buf got unsigned int [usertype] *[assigned] buf Add a cast to fix it. Fixes: 4531143 ("drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()") Signed-off-by: José Expósito <jose.exposito89@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20250630090054.353246-1-jose.exposito89@gmail.com
1 parent 8d2b085 commit d28b9d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/tests/drm_format_helper_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
10331033
NULL : &result->dst_pitch;
10341034

10351035
drm_fb_xrgb8888_to_xrgb2101010(&dst, dst_pitch, &src, &fb, &params->clip, &fmtcnv_state);
1036-
buf = le32buf_to_cpu(test, buf, dst_size / sizeof(u32));
1036+
buf = le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / sizeof(u32));
10371037
KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
10381038

10391039
buf = dst.vaddr; /* restore original value of buf */

0 commit comments

Comments
 (0)