Skip to contentSkip to conversation

drm/tests/buddy: fix build with unused prng

PATCH In review Matthew Auld 2 participants 2 messages Jan 15, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/tests/buddy: fix build with unused prng

We no longer use the prng, which leads to the following warning:

drivers/gpu/drm/tests/drm_buddy_test.c: In function ‘drm_test_buddy_alloc_clear’:
drivers/gpu/drm/tests/drm_buddy_test.c:264:23: error: unused variable ‘prng’ [-Werror=unused-variable]
264 | DRM_RND_STATE(prng, random_seed);

v2 (Thomas)
- Add Closes links

---
 drivers/gpu/drm/tests/drm_buddy_test.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/tests/drm_buddy_test.c +0 -1
index 4b5818f9f2a9..7a0e523651f0 100644
@@ -261,7 +261,6 @@ static void drm_test_buddy_alloc_range_bias(struct kunit *test)
 static void drm_test_buddy_alloc_clear(struct kunit *test)
 {
 	unsigned long n_pages, total, i = 0;
-	DRM_RND_STATE(prng, random_seed);
 	const unsigned long ps = SZ_4K;
 	struct drm_buddy_block *block;
 	const int max_order = 12;
Signature · 1 line
2.47.1
Reviewed-by on v2 1/1
#1 lore raw

Thank you, I was going to send this patch out.

@Jani, Thomas - Are you planning to merge this patch into drm-misc-next and try re-building drm-tip?

Regards,
Arun.

Quoted 36 lines · Matthew Auld

We no longer use the prng, which leads to the following warning:

drivers/gpu/drm/tests/drm_buddy_test.c: In function ‘drm_test_buddy_alloc_clear’:
drivers/gpu/drm/tests/drm_buddy_test.c:264:23: error: unused variable ‘prng’ [-Werror=unused-variable]
264 | DRM_RND_STATE(prng, random_seed);

v2 (Thomas)
- Add Closes links

---
  drivers/gpu/drm/tests/drm_buddy_test.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/tests/drm_buddy_test.c +0 -1
index 4b5818f9f2a9..7a0e523651f0 100644
@@ -261,7 +261,6 @@ static void drm_test_buddy_alloc_range_bias(struct kunit *test)
  static void drm_test_buddy_alloc_clear(struct kunit *test)
  {
  	unsigned long n_pages, total, i = 0;
-	DRM_RND_STATE(prng, random_seed);
  	const unsigned long ps = SZ_4K;
  	struct drm_buddy_block *block;
  	const int max_order = 12;