diff options
author | 2025-01-02 13:22:43 -0800 | |
---|---|---|
committer | 2025-01-03 23:38:19 -0600 | |
commit | 3b5bcf64a65b36e91b6bead03de1df6f2705ad94 (patch) | |
tree | 6a629a0a4bfc7ae9ced43f207b9cb550fe566d8e | |
parent | accel/amdxdna: Declare force_cmdlist as static (diff) | |
download | linux-rng-3b5bcf64a65b36e91b6bead03de1df6f2705ad94.tar.xz linux-rng-3b5bcf64a65b36e91b6bead03de1df6f2705ad94.zip |
accel/amdxdna: Add __user to second parameter of aie2_query_status
The second parameter of aie2_query_status() is a userspace pointer.
Declaring it as 'char __user *' to fix sparse warning.
Fixes: 850d71f6bf4c ("accel/amdxdna: Add query functions")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412311655.YBvq2wJb-lkp@intel.com/
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-6-lizhi.hou@amd.com
-rw-r--r-- | drivers/accel/amdxdna/aie2_pci.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/accel/amdxdna/aie2_pci.h b/drivers/accel/amdxdna/aie2_pci.h index cc159cadff9f..f2d95531ddc2 100644 --- a/drivers/accel/amdxdna/aie2_pci.h +++ b/drivers/accel/amdxdna/aie2_pci.h @@ -269,7 +269,7 @@ int aie2_query_firmware_version(struct amdxdna_dev_hdl *ndev, int aie2_create_context(struct amdxdna_dev_hdl *ndev, struct amdxdna_hwctx *hwctx); int aie2_destroy_context(struct amdxdna_dev_hdl *ndev, struct amdxdna_hwctx *hwctx); int aie2_map_host_buf(struct amdxdna_dev_hdl *ndev, u32 context_id, u64 addr, u64 size); -int aie2_query_status(struct amdxdna_dev_hdl *ndev, char *buf, u32 size, u32 *cols_filled); +int aie2_query_status(struct amdxdna_dev_hdl *ndev, char __user *buf, u32 size, u32 *cols_filled); int aie2_register_asyn_event_msg(struct amdxdna_dev_hdl *ndev, dma_addr_t addr, u32 size, void *handle, int (*cb)(void*, const u32 *, size_t)); int aie2_config_cu(struct amdxdna_hwctx *hwctx); |