From: Mario Limonciello <mario.limonciello@amd.com>
To: Lizhi Hou <lizhi.hou@amd.com>,
ogabbay@kernel.org, quic_jhugo@quicinc.com,
jacek.lawrynowicz@linux.intel.com,
dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, max.zhen@amd.com,
sonal.santan@amd.com, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] accel/amdxdna: Fix incorrect type used for a local variable
Date: Tue, 26 Aug 2025 11:50:42 -0500 [thread overview]
Message-ID: <b2f4a70f-62ff-41c7-b0bd-ad8723f70ba0@amd.com> (raw)
In-Reply-To: <20250826160321.795866-1-lizhi.hou@amd.com>
On 8/26/2025 11:03 AM, Lizhi Hou wrote:
> drivers/accel/amdxdna/aie2_pci.c:794:13: sparse: sparse: incorrect type in assignment (different address spaces)
>
> Fixes: c8cea4371e5e ("accel/amdxdna: Add a function to walk hardware contexts")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508230855.0b9efFl6-lkp@intel.com/
> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
> ---
> drivers/accel/amdxdna/aie2_pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
> index 16ac0cab4f44..2885a3c17e89 100644
> --- a/drivers/accel/amdxdna/aie2_pci.c
> +++ b/drivers/accel/amdxdna/aie2_pci.c
> @@ -785,7 +785,7 @@ static int aie2_get_clock_metadata(struct amdxdna_client *client,
>
> static int aie2_hwctx_status_cb(struct amdxdna_hwctx *hwctx, void *arg)
> {
> - struct amdxdna_drm_query_hwctx __user *buf, *tmp __free(kfree) = NULL;
> + struct amdxdna_drm_query_hwctx *tmp __free(kfree) = NULL, __user *buf;
IMO it would be better to just split these into two separate
declarations so that we don't have to worry about nuance of order of
operations resolving the type.
> struct amdxdna_drm_get_info *get_info_args = arg;
>
> if (get_info_args->buffer_size < sizeof(*tmp))
next prev parent reply other threads:[~2025-08-26 16:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 16:03 Lizhi Hou
2025-08-26 16:50 ` Mario Limonciello [this message]
2025-08-26 17:15 ` Lizhi Hou
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=b2f4a70f-62ff-41c7-b0bd-ad8723f70ba0@amd.com \
--to=mario.limonciello@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=lkp@intel.com \
--cc=max.zhen@amd.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.com \
--cc=sonal.santan@amd.com \
/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
all inboxes | Powered by JetHome®