linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jason Wang <jasowang@redhat.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Eli Cohen <elic@nvidia.com>
Subject: [linux-next:master 15563/15831] drivers/vdpa/virtio_pci/vp_vdpa.c:418:42: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Tue, 4 May 2021 13:53:49 +0800	[thread overview]
Message-ID: <202105041344.IfetmyZV-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3794 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   9a9aa07ae18be3b77ba132a6eff3a92c9b83e016
commit: 11d8ffed00b231356008b35a3b0bc192e42333fa [15563/15831] vp_vdpa: switch to use vp_modern_map_vq_notify()
config: x86_64-randconfig-s022-20210504 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=11d8ffed00b231356008b35a3b0bc192e42333fa
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 11d8ffed00b231356008b35a3b0bc192e42333fa
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/vdpa/virtio_pci/vp_vdpa.c:418:42: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __iomem *notify @@     got void * @@
   drivers/vdpa/virtio_pci/vp_vdpa.c:418:42: sparse:     expected void [noderef] __iomem *notify
   drivers/vdpa/virtio_pci/vp_vdpa.c:418:42: sparse:     got void *

vim +418 drivers/vdpa/virtio_pci/vp_vdpa.c

   366	
   367	static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
   368	{
   369		struct virtio_pci_modern_device *mdev;
   370		struct device *dev = &pdev->dev;
   371		struct vp_vdpa *vp_vdpa;
   372		int ret, i;
   373	
   374		ret = pcim_enable_device(pdev);
   375		if (ret)
   376			return ret;
   377	
   378		vp_vdpa = vdpa_alloc_device(struct vp_vdpa, vdpa,
   379					    dev, &vp_vdpa_ops, NULL);
   380		if (vp_vdpa == NULL) {
   381			dev_err(dev, "vp_vdpa: Failed to allocate vDPA structure\n");
   382			return -ENOMEM;
   383		}
   384	
   385		mdev = &vp_vdpa->mdev;
   386		mdev->pci_dev = pdev;
   387	
   388		ret = vp_modern_probe(mdev);
   389		if (ret) {
   390			dev_err(&pdev->dev, "Failed to probe modern PCI device\n");
   391			goto err;
   392		}
   393	
   394		pci_set_master(pdev);
   395		pci_set_drvdata(pdev, vp_vdpa);
   396	
   397		vp_vdpa->vdpa.dma_dev = &pdev->dev;
   398		vp_vdpa->queues = vp_modern_get_num_queues(mdev);
   399	
   400		ret = devm_add_action_or_reset(dev, vp_vdpa_free_irq_vectors, pdev);
   401		if (ret) {
   402			dev_err(&pdev->dev,
   403				"Failed for adding devres for freeing irq vectors\n");
   404			goto err;
   405		}
   406	
   407		vp_vdpa->vring = devm_kcalloc(&pdev->dev, vp_vdpa->queues,
   408					      sizeof(*vp_vdpa->vring),
   409					      GFP_KERNEL);
   410		if (!vp_vdpa->vring) {
   411			ret = -ENOMEM;
   412			dev_err(&pdev->dev, "Fail to allocate virtqueues\n");
   413			goto err;
   414		}
   415	
   416		for (i = 0; i < vp_vdpa->queues; i++) {
   417			vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR;
 > 418			vp_vdpa->vring[i].notify = vp_modern_map_vq_notify(mdev, i);
   419			if (!vp_vdpa->vring[i].notify) {
   420				dev_warn(&pdev->dev, "Fail to map vq notify %d\n", i);
   421				goto err;
   422			}
   423		}
   424		vp_vdpa->config_irq = VIRTIO_MSI_NO_VECTOR;
   425	
   426		ret = vdpa_register_device(&vp_vdpa->vdpa, vp_vdpa->queues);
   427		if (ret) {
   428			dev_err(&pdev->dev, "Failed to register to vdpa bus\n");
   429			goto err;
   430		}
   431	
   432		return 0;
   433	
   434	err:
   435		put_device(&vp_vdpa->vdpa.dev);
   436		return ret;
   437	}
   438	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34204 bytes --]

                 reply	other threads:[~2021-05-04  5:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202105041344.IfetmyZV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=elic@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=mst@redhat.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;
as well as URLs for NNTP newsgroup(s).