Skip to content

Commit 9c319a0

Browse files
drobnikChristianKoenigAMD
authored andcommitted
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 <karolina.stolarek@intel.com> Cc: Christian König <christian.koenig@amd.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308150419.PaHfWntn-lkp@intel.com/ Link: https://patchwork.freedesktop.org/patch/msgid/20230816105508.1135410-1-karolina.stolarek@intel.com Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
1 parent ff065ea commit 9c319a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/ttm/tests/ttm_pool_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ static void ttm_pool_alloc_basic_dma_addr(struct kunit *test)
228228
dma1 = tt->dma_address[0];
229229
dma2 = tt->dma_address[tt->num_pages - 1];
230230

231-
KUNIT_ASSERT_NOT_NULL(test, (void *)dma1);
232-
KUNIT_ASSERT_NOT_NULL(test, (void *)dma2);
231+
KUNIT_ASSERT_NOT_NULL(test, (void *)(uintptr_t)dma1);
232+
KUNIT_ASSERT_NOT_NULL(test, (void *)(uintptr_t)dma2);
233233

234234
ttm_pool_free(pool, tt);
235235
ttm_tt_fini(tt);

0 commit comments

Comments
 (0)