amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Alex Hung <alex.hung@amd.com>
Cc: amd-gfx@lists.freedesktop.org, "SHANMUGAM,
	SRINIVASAN" <SRINIVASAN.SHANMUGAM@amd.com>
Subject: [bug report] drm/amd/display: Test GPU memory allocation
Date: Thu, 10 Sep 2026 20:15:43 +0300	[thread overview]
Message-ID: <aqLlv7dOd9WB70hJ@stanley.mountain> (raw)

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

                 reply	other threads:[~2026-09-11  8:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqLlv7dOd9WB70hJ@stanley.mountain \
    --to=error27@gmail.com \
    --cc=SRINIVASAN.SHANMUGAM@amd.com \
    --cc=alex.hung@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).