All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] accel/amdxdna: Support firmware debug buffer
@ 2025-10-24  6:19 Dan Carpenter
  2025-10-24 16:03 ` Lizhi Hou
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-10-24  6:19 UTC (permalink / raw)
  To: Lizhi Hou; +Cc: dri-devel

Hello Lizhi Hou,

Commit 7ea046838021 ("accel/amdxdna: Support firmware debug buffer")
from Oct 16, 2025 (linux-next), leads to the following Smatch static
checker warning:

	drivers/accel/amdxdna/aie2_ctx.c:882 aie2_hwctx_sync_debug_bo()
	warn: missing error code? 'ret'

drivers/accel/amdxdna/aie2_ctx.c
    863 int aie2_hwctx_sync_debug_bo(struct amdxdna_hwctx *hwctx, u32 debug_bo_hdl)
    864 {
    865         struct amdxdna_client *client = hwctx->client;
    866         struct amdxdna_dev *xdna = client->xdna;
    867         struct amdxdna_drv_cmd cmd = { 0 };
    868         u64 seq;
    869         int ret;
    870 
    871         cmd.opcode = SYNC_DEBUG_BO;
    872         ret = amdxdna_cmd_submit(client, &cmd, AMDXDNA_INVALID_BO_HANDLE,
    873                                  &debug_bo_hdl, 1, hwctx->id, &seq);
    874         if (ret) {
    875                 XDNA_ERR(xdna, "Submit command failed");
    876                 return ret;
    877         }
    878 
    879         aie2_cmd_wait(hwctx, seq);
    880         if (cmd.result) {
    881                 XDNA_ERR(xdna, "Response failure 0x%x", cmd.result);
--> 882                 return ret;

ret is zero.  return -EINVAL or something?

    883         }
    884 
    885         return 0;
    886 }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] accel/amdxdna: Support firmware debug buffer
  2025-10-24  6:19 [bug report] accel/amdxdna: Support firmware debug buffer Dan Carpenter
@ 2025-10-24 16:03 ` Lizhi Hou
  0 siblings, 0 replies; 2+ messages in thread
From: Lizhi Hou @ 2025-10-24 16:03 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: dri-devel


On 10/23/25 23:19, Dan Carpenter wrote:
> Hello Lizhi Hou,
>
> Commit 7ea046838021 ("accel/amdxdna: Support firmware debug buffer")
> from Oct 16, 2025 (linux-next), leads to the following Smatch static
> checker warning:
>
> 	drivers/accel/amdxdna/aie2_ctx.c:882 aie2_hwctx_sync_debug_bo()
> 	warn: missing error code? 'ret'
>
> drivers/accel/amdxdna/aie2_ctx.c

That is true. I will fix it. Thanks.

Lizhi

>      863 int aie2_hwctx_sync_debug_bo(struct amdxdna_hwctx *hwctx, u32 debug_bo_hdl)
>      864 {
>      865         struct amdxdna_client *client = hwctx->client;
>      866         struct amdxdna_dev *xdna = client->xdna;
>      867         struct amdxdna_drv_cmd cmd = { 0 };
>      868         u64 seq;
>      869         int ret;
>      870
>      871         cmd.opcode = SYNC_DEBUG_BO;
>      872         ret = amdxdna_cmd_submit(client, &cmd, AMDXDNA_INVALID_BO_HANDLE,
>      873                                  &debug_bo_hdl, 1, hwctx->id, &seq);
>      874         if (ret) {
>      875                 XDNA_ERR(xdna, "Submit command failed");
>      876                 return ret;
>      877         }
>      878
>      879         aie2_cmd_wait(hwctx, seq);
>      880         if (cmd.result) {
>      881                 XDNA_ERR(xdna, "Response failure 0x%x", cmd.result);
> --> 882                 return ret;
>
> ret is zero.  return -EINVAL or something?
>
>      883         }
>      884
>      885         return 0;
>      886 }
>
> regards,
> dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-24 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24  6:19 [bug report] accel/amdxdna: Support firmware debug buffer Dan Carpenter
2025-10-24 16:03 ` Lizhi Hou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.