All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/tests/drm_buddy: fix 32b build
@ 2024-02-15 17:44 Matthew Auld
  2024-02-15 17:44 ` [PATCH 2/6] drm/buddy: fix range bias Matthew Auld
                   ` (13 more replies)
  0 siblings, 14 replies; 29+ messages in thread
From: Matthew Auld @ 2024-02-15 17:44 UTC (permalink / raw)
  To: intel-xe
  Cc: dri-devel, Geert Uytterhoeven, Arunpravin Paneer Selvam,
	Christian König, Maxime Ripard

Doesn't seem to compile on 32b, presumably due to u64 mod/division.
Simplest is to just switch over to u32 here. Also make print modifiers
consistent with that.

Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Maxime Ripard <mripard@redhat.com>
---
 drivers/gpu/drm/tests/drm_buddy_test.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c
index fee6bec757d1..edacc1adb28f 100644
--- a/drivers/gpu/drm/tests/drm_buddy_test.c
+++ b/drivers/gpu/drm/tests/drm_buddy_test.c
@@ -21,7 +21,7 @@ static inline u64 get_size(int order, u64 chunk_size)
 
 static void drm_test_buddy_alloc_contiguous(struct kunit *test)
 {
-	u64 mm_size, ps = SZ_4K, i, n_pages, total;
+	u32 mm_size, ps = SZ_4K, i, n_pages, total;
 	struct drm_buddy_block *block;
 	struct drm_buddy mm;
 	LIST_HEAD(left);
@@ -56,30 +56,30 @@ static void drm_test_buddy_alloc_contiguous(struct kunit *test)
 		KUNIT_ASSERT_FALSE_MSG(test,
 				       drm_buddy_alloc_blocks(&mm, 0, mm_size,
 							      ps, ps, list, 0),
-				       "buddy_alloc hit an error size=%d\n",
+				       "buddy_alloc hit an error size=%u\n",
 				       ps);
 	} while (++i < n_pages);
 
 	KUNIT_ASSERT_TRUE_MSG(test, drm_buddy_alloc_blocks(&mm, 0, mm_size,
 							   3 * ps, ps, &allocated,
 							   DRM_BUDDY_CONTIGUOUS_ALLOCATION),
-			       "buddy_alloc didn't error size=%d\n", 3 * ps);
+			       "buddy_alloc didn't error size=%u\n", 3 * ps);
 
 	drm_buddy_free_list(&mm, &middle);
 	KUNIT_ASSERT_TRUE_MSG(test, drm_buddy_alloc_blocks(&mm, 0, mm_size,
 							   3 * ps, ps, &allocated,
 							   DRM_BUDDY_CONTIGUOUS_ALLOCATION),
-			       "buddy_alloc didn't error size=%llu\n", 3 * ps);
+			       "buddy_alloc didn't error size=%u\n", 3 * ps);
 	KUNIT_ASSERT_TRUE_MSG(test, drm_buddy_alloc_blocks(&mm, 0, mm_size,
 							   2 * ps, ps, &allocated,
 							   DRM_BUDDY_CONTIGUOUS_ALLOCATION),
-			       "buddy_alloc didn't error size=%llu\n", 2 * ps);
+			       "buddy_alloc didn't error size=%u\n", 2 * ps);
 
 	drm_buddy_free_list(&mm, &right);
 	KUNIT_ASSERT_TRUE_MSG(test, drm_buddy_alloc_blocks(&mm, 0, mm_size,
 							   3 * ps, ps, &allocated,
 							   DRM_BUDDY_CONTIGUOUS_ALLOCATION),
-			       "buddy_alloc didn't error size=%llu\n", 3 * ps);
+			       "buddy_alloc didn't error size=%u\n", 3 * ps);
 	/*
 	 * At this point we should have enough contiguous space for 2 blocks,
 	 * however they are never buddies (since we freed middle and right) so
@@ -88,13 +88,13 @@ static void drm_test_buddy_alloc_contiguous(struct kunit *test)
 	KUNIT_ASSERT_FALSE_MSG(test, drm_buddy_alloc_blocks(&mm, 0, mm_size,
 							    2 * ps, ps, &allocated,
 							    DRM_BUDDY_CONTIGUOUS_ALLOCATION),
-			       "buddy_alloc hit an error size=%d\n", 2 * ps);
+			       "buddy_alloc hit an error size=%u\n", 2 * ps);
 
 	drm_buddy_free_list(&mm, &left);
 	KUNIT_ASSERT_FALSE_MSG(test, drm_buddy_alloc_blocks(&mm, 0, mm_size,
 							    3 * ps, ps, &allocated,
 							    DRM_BUDDY_CONTIGUOUS_ALLOCATION),
-			       "buddy_alloc hit an error size=%d\n", 3 * ps);
+			       "buddy_alloc hit an error size=%u\n", 3 * ps);
 
 	total = 0;
 	list_for_each_entry(block, &allocated, link)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2024-02-28  9:21 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 17:44 [PATCH 1/6] drm/tests/drm_buddy: fix 32b build Matthew Auld
2024-02-15 17:44 ` [PATCH 2/6] drm/buddy: fix range bias Matthew Auld
2024-02-16 11:40   ` Arunpravin Paneer Selvam
2024-02-15 17:44 ` [PATCH 3/6] drm/buddy: check range allocation matches alignment Matthew Auld
2024-02-16 11:25   ` Arunpravin Paneer Selvam
2024-02-15 17:44 ` [PATCH 4/6] drm/tests/drm_buddy: add alloc_range_bias test Matthew Auld
2024-02-16 11:26   ` Arunpravin Paneer Selvam
2024-02-15 17:44 ` [PATCH 5/6] drm/xe/stolen: lower the default alignment Matthew Auld
2024-02-15 17:44 ` [PATCH 6/6] drm/xe/stolen: ignore first page for FBC Matthew Auld
2024-02-16 13:59   ` Maarten Lankhorst
2024-02-15 17:54 ` ✓ CI.Patch_applied: success for series starting with [1/6] drm/tests/drm_buddy: fix 32b build Patchwork
2024-02-15 17:55 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-15 17:56 ` ✓ CI.KUnit: success " Patchwork
2024-02-15 18:07 ` ✓ CI.Build: " Patchwork
2024-02-15 18:08 ` ✓ CI.Hooks: " Patchwork
2024-02-15 18:09 ` ✗ CI.checksparse: warning " Patchwork
2024-02-15 18:31 ` ✓ CI.BAT: success " Patchwork
2024-02-16 11:23 ` [PATCH 1/6] " Arunpravin Paneer Selvam
2024-02-19  9:42 ` Matthew Auld
2024-02-19  9:53   ` Christian König
2024-02-19 10:28     ` Matthew Auld
2024-02-19 10:30       ` Christian König
2024-02-19 10:48         ` Matthew Auld
2024-02-19 12:24           ` Matthew Auld
2024-02-26  9:58             ` Matthew Auld
2024-02-26 10:38               ` Geert Uytterhoeven
2024-02-26 11:21                 ` Matthew Auld
2024-02-28  7:20               ` Christian König
2024-02-28  9:20                 ` Matthew Auld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.