summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tests
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2025-06-30 11:00:53 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 16:31:11 +0200
commit8b9c53f8edd4a877923b4ff6f80677733c7a3b61 (patch)
treedff8b82dadb0e1570045905eb98e0ec86607cb83 /drivers/gpu/drm/tests
parent7a60c21384c881cee33e12e9e93a6eb4bf1e5ba6 (diff)
downloadlinux-8b9c53f8edd4a877923b4ff6f80677733c7a3b61.tar.gz
linux-8b9c53f8edd4a877923b4ff6f80677733c7a3b61.tar.bz2
linux-8b9c53f8edd4a877923b4ff6f80677733c7a3b61.zip
drm/tests: Fix endian warning
[ Upstream commit d28b9d2925b4f773adb21b1fc20260ddc370fb13 ] 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: 453114319699 ("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/tests')
-rw-r--r--drivers/gpu/drm/tests/drm_format_helper_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
index 08992636ec05..b4d62fb1d909 100644
--- a/drivers/gpu/drm/tests/drm_format_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
@@ -991,7 +991,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
NULL : &result->dst_pitch;
drm_fb_xrgb8888_to_xrgb2101010(&dst, dst_pitch, &src, &fb, &params->clip, &fmtcnv_state);
- buf = le32buf_to_cpu(test, buf, dst_size / sizeof(u32));
+ buf = le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / sizeof(u32));
KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
buf = dst.vaddr; /* restore original value of buf */