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

Reply via email to