drm/ttm/tests: Fix type conversion in ttm_pool_test
Subsystems (3)
PATCH 1/1 drm/ttm/tests: Fix type conversion in ttm_pool_test
Fix a warning about casting an integer of different size in ttm_pool_alloc_basic_dma_addr() subtest. Cast the DMA address to uintptr_t before casting it to a generic pointer.
Signed-off-by Karolina Stolarek <[email protected]>
Cc Christian König <[email protected]>
Reported-by kernel test robot <[email protected]>
--- drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/ttm/tests/ttm_pool_test.c +2 -2
@@ -228,8 +228,8 @@ static void ttm_pool_alloc_basic_dma_addr(struct kunit *test) dma1 = tt->dma_address[0 ]; dma2 = tt->dma_address[tt->num_pages -1 ]; -KUNIT_ASSERT_NOT_NULL (test, (void *)dma1); -KUNIT_ASSERT_NOT_NULL (test, (void *)dma2); +KUNIT_ASSERT_NOT_NULL (test, (void *)(uintptr_t )dma1); +KUNIT_ASSERT_NOT_NULL (test, (void *)(uintptr_t )dma2);ttm_pool_free (pool, tt);ttm_tt_fini (tt);
Signature · 1 line
2.25.1