dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lizhi Hou <lizhi.hou@amd.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: <dri-devel@lists.freedesktop.org>
Subject: Re: [bug report] accel/amdxdna: Enhance power management settings
Date: Wed, 8 Jan 2025 10:14:47 -0800	[thread overview]
Message-ID: <47966a55-0272-b4c7-3717-fabf85cc0f3d@amd.com> (raw)
In-Reply-To: <202267d0-882e-4593-b58d-be9274592f9b@stanley.mountain>


On 1/8/25 00:40, Dan Carpenter wrote:
> Hello Lizhi Hou,
>
> Commit f4d7b8a6bc8c ("accel/amdxdna: Enhance power management
> settings") from Dec 13, 2024 (linux-next), leads to the following
> Smatch static checker warning:
>
> 	drivers/accel/amdxdna/aie2_smu.c:68 npu1_set_dpm()
> 	error: uninitialized symbol 'freq'.
>
> drivers/accel/amdxdna/aie2_smu.c

Thanks for pointing this out. I will fix it.

I actually did run smatch_scripts/kchecker and it is clean.

Maybe I did not use the correct command. Could you share the instruction 
to reproduce this?


Thanks,

Lizhi

>      57 int npu1_set_dpm(struct amdxdna_dev_hdl *ndev, u32 dpm_level)
>      58 {
>      59         u32 freq;
>      60         int ret;
>      61
>      62         ret = aie2_smu_exec(ndev, AIE2_SMU_SET_MPNPUCLK_FREQ,
>      63                             ndev->priv->dpm_clk_tbl[dpm_level].npuclk, &freq);
>      64         if (ret) {
>      65                 XDNA_ERR(ndev->xdna, "Set npu clock to %d failed, ret %d\n",
>      66                          ndev->priv->dpm_clk_tbl[dpm_level].npuclk, ret);
>
> return ret; ?
>
>      67         }
> --> 68         ndev->npuclk_freq = freq;
>      69
>      70         ret = aie2_smu_exec(ndev, AIE2_SMU_SET_HCLK_FREQ,
>      71                             ndev->priv->dpm_clk_tbl[dpm_level].hclk, &freq);
>      72         if (ret) {
>      73                 XDNA_ERR(ndev->xdna, "Set h clock to %d failed, ret %d\n",
>      74                          ndev->priv->dpm_clk_tbl[dpm_level].hclk, ret);
>
> Here too?
>
>      75         }
>      76         ndev->hclk_freq = freq;
>      77         ndev->dpm_level = dpm_level;
>      78
>      79         XDNA_DBG(ndev->xdna, "MP-NPU clock %d, H clock %d\n",
>      80                  ndev->npuclk_freq, ndev->hclk_freq);
>      81
>      82         return 0;
>      83 }
>
> regards,
> dan carpenter

  reply	other threads:[~2025-01-08 18:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08  8:40 [bug report] accel/amdxdna: Enhance power management settings Dan Carpenter
2025-01-08 18:14 ` Lizhi Hou [this message]
2025-01-08 18:19   ` Dan Carpenter

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=47966a55-0272-b4c7-3717-fabf85cc0f3d@amd.com \
    --to=lizhi.hou@amd.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dri-devel@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