Message ID | 20250115123734.154243-2-matthew.auld@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | drm/tests/buddy: fix build with unused prng | expand |
On Wed, 2025-01-15 at 12:37 +0000, Matthew Auld wrote: > 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); > > Reported-by: Jani Nikula <jani.nikula@intel.com> > Reported-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > Fixes: 8cb3a1e2b350 ("drm/buddy: Add a testcase to verify the > multiroot fini") > 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> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > --- > drivers/gpu/drm/tests/drm_buddy_test.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c > b/drivers/gpu/drm/tests/drm_buddy_test.c > index 4b5818f9f2a9..7a0e523651f0 100644 > --- a/drivers/gpu/drm/tests/drm_buddy_test.c > +++ b/drivers/gpu/drm/tests/drm_buddy_test.c > @@ -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;
On Wed, 2025-01-15 at 13:40 +0100, Thomas Hellström wrote: > On Wed, 2025-01-15 at 12:37 +0000, Matthew Auld wrote: > > 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); > > > > Reported-by: Jani Nikula <jani.nikula@intel.com> > > Reported-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > > Fixes: 8cb3a1e2b350 ("drm/buddy: Add a testcase to verify the > > multiroot fini") > > 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> > > Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Oh, checkpatch.pl might complain about some missing tags, though, like Closes: or Link: /Thomas > > > --- > > drivers/gpu/drm/tests/drm_buddy_test.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c > > b/drivers/gpu/drm/tests/drm_buddy_test.c > > index 4b5818f9f2a9..7a0e523651f0 100644 > > --- a/drivers/gpu/drm/tests/drm_buddy_test.c > > +++ b/drivers/gpu/drm/tests/drm_buddy_test.c > > @@ -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; >
diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c index 4b5818f9f2a9..7a0e523651f0 100644 --- a/drivers/gpu/drm/tests/drm_buddy_test.c +++ b/drivers/gpu/drm/tests/drm_buddy_test.c @@ -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;
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); Reported-by: Jani Nikula <jani.nikula@intel.com> Reported-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Fixes: 8cb3a1e2b350 ("drm/buddy: Add a testcase to verify the multiroot fini") 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> --- drivers/gpu/drm/tests/drm_buddy_test.c | 1 - 1 file changed, 1 deletion(-)