]> www.infradead.org Git - users/hch/misc.git/commitdiff
accel/amdxdna: Fix incorrect type used for a local variable
authorLizhi Hou <lizhi.hou@amd.com>
Tue, 26 Aug 2025 17:19:51 +0000 (10:19 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Tue, 26 Aug 2025 18:18:22 +0000 (11:18 -0700)
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/
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250826171951.801585-1-lizhi.hou@amd.com
drivers/accel/amdxdna/aie2_pci.c

index 16ac0cab4f4406b1a1b50eee4ffb5f398b1fe13a..7a3449541107c77d290320817d69d0e6f62a246f 100644 (file)
@@ -785,8 +785,9 @@ 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;
        struct amdxdna_drm_get_info *get_info_args = arg;
+       struct amdxdna_drm_query_hwctx __user *buf;
 
        if (get_info_args->buffer_size < sizeof(*tmp))
                return -EINVAL;