From: kernel test robot <lkp@intel.com>
To: Lizhi Hou <lizhi.hou@amd.com>
Cc: oe-kbuild-all@lists.linux.dev,
Jeffrey Hugo <quic_jhugo@quicinc.com>, Min Ma <min.ma@amd.com>
Subject: [linux-next:master 483/5236] drivers/accel/amdxdna/aie2_pci.c:549:39: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Sat, 4 Jan 2025 01:26:27 +0800 [thread overview]
Message-ID: <202501040135.plFlC72Z-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2
commit: 850d71f6bf4c2010efae845f9ff841cce902f22c [483/5236] accel/amdxdna: Add query functions
config: x86_64-randconfig-122-20241231 (https://download.01.org/0day-ci/archive/20250104/202501040135.plFlC72Z-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250104/202501040135.plFlC72Z-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501040135.plFlC72Z-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/accel/amdxdna/aie2_pci.c:27:5: sparse: sparse: symbol 'aie2_max_col' was not declared. Should it be static?
drivers/accel/amdxdna/aie2_pci.c:311:34: sparse: sparse: cast removes address space '__iomem' of expression
drivers/accel/amdxdna/aie2_pci.c:313:31: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/accel/amdxdna/aie2_pci.c:549:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected char *buf @@ got void [noderef] __user * @@
drivers/accel/amdxdna/aie2_pci.c:549:39: sparse: expected char *buf
drivers/accel/amdxdna/aie2_pci.c:549:39: sparse: got void [noderef] __user *
vim +549 drivers/accel/amdxdna/aie2_pci.c
528
529 static int aie2_get_aie_status(struct amdxdna_client *client,
530 struct amdxdna_drm_get_info *args)
531 {
532 struct amdxdna_drm_query_aie_status status;
533 struct amdxdna_dev *xdna = client->xdna;
534 struct amdxdna_dev_hdl *ndev;
535 int ret;
536
537 ndev = xdna->dev_handle;
538 if (copy_from_user(&status, u64_to_user_ptr(args->buffer), sizeof(status))) {
539 XDNA_ERR(xdna, "Failed to copy AIE request into kernel");
540 return -EFAULT;
541 }
542
543 if (ndev->metadata.cols * ndev->metadata.size < status.buffer_size) {
544 XDNA_ERR(xdna, "Invalid buffer size. Given Size: %u. Need Size: %u.",
545 status.buffer_size, ndev->metadata.cols * ndev->metadata.size);
546 return -EINVAL;
547 }
548
> 549 ret = aie2_query_status(ndev, u64_to_user_ptr(status.buffer),
550 status.buffer_size, &status.cols_filled);
551 if (ret) {
552 XDNA_ERR(xdna, "Failed to get AIE status info. Ret: %d", ret);
553 return ret;
554 }
555
556 if (copy_to_user(u64_to_user_ptr(args->buffer), &status, sizeof(status))) {
557 XDNA_ERR(xdna, "Failed to copy AIE request info to user space");
558 return -EFAULT;
559 }
560
561 return 0;
562 }
563
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-01-03 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 17:26 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-31 8:49 [linux-next:master 483/5236] drivers/accel/amdxdna/aie2_pci.c:549:39: sparse: sparse: incorrect type in argument 2 (different address spaces) kernel test robot
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=202501040135.plFlC72Z-lkp@intel.com \
--to=lkp@intel.com \
--cc=lizhi.hou@amd.com \
--cc=min.ma@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_jhugo@quicinc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.