* [bug report] drm/amd/display: Test GPU memory allocation
@ 2026-09-10 17:15 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-09-10 17:15 UTC (permalink / raw)
To: Alex Hung; +Cc: amd-gfx, SHANMUGAM, SRINIVASAN
Hello Alex Hung,
Commit e3d5618d4dad ("drm/amd/display: Test GPU memory allocation")
from Aug 10, 2026 (linux-next), leads to the following Smatch static
checker warning:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/tests/amdgpu_dm_services_test.c:340 dm_test_gpu_mem_init()
warn: sizeof(void)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/tests/amdgpu_dm_services_test.c
336 static int dm_test_gpu_mem_init(struct kunit *test)
337 {
338 void *cpu_ptr;
339
--> 340 cpu_ptr = kunit_kzalloc(test, sizeof(*cpu_ptr), GFP_KERNEL);
^^^^^^^^
cpu_ptr is a void pointer. It doesn't make sense. Probably remove
the asterisk.
341 KUNIT_ASSERT_NOT_NULL(test, cpu_ptr);
342
343 dm_test_bo_ctx = (struct dm_test_bo_ops_ctx) {
344 .cpu_ptr = cpu_ptr,
345 .gpu_addr = DM_TEST_FAKE_GPU_ADDR,
346 };
347
348 amdgpu_dm_services_kunit_set_ops(&dm_test_bo_ops);
349
350 return 0;
351 }
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 8:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 17:15 [bug report] drm/amd/display: Test GPU memory allocation Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).