All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 1/2] virtio: stop using legacy struct vring in kernel
Date: Wed, 08 Apr 2020 08:13:57 +0800	[thread overview]
Message-ID: <202004080858.eMqdd5fc%lkp@intel.com> (raw)
In-Reply-To: <20200406161146.130741-2-mst@redhat.com>

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

Hi "Michael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20200406]
[also build test WARNING on v5.6]
[cannot apply to vhost/linux-next linus/master linux/master v5.6 v5.6-rc7 v5.6-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Michael-S-Tsirkin/virtio-alignment-issues/20200407-025651
base:    b2e2a818a01717ba15c74fd355f76822b81a95f6
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-188-g79f7ac98-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

   drivers/remoteproc/remoteproc_core.c:331:16: sparse: sparse: undefined identifier 'vring_size'
   drivers/remoteproc/remoteproc_core.c:331:16: sparse: sparse: undefined identifier 'vring_size'
   drivers/remoteproc/remoteproc_core.c:331:16: sparse: sparse: incompatible types for operation (-):
>> drivers/remoteproc/remoteproc_core.c:331:16: sparse:    bad type
>> drivers/remoteproc/remoteproc_core.c:331:16: sparse:    int
   drivers/remoteproc/remoteproc_core.c:331:16: sparse: sparse: undefined identifier 'vring_size'
   drivers/remoteproc/remoteproc_core.c:331:16: sparse: sparse: incompatible types for operation (-):
>> drivers/remoteproc/remoteproc_core.c:331:16: sparse:    bad type
>> drivers/remoteproc/remoteproc_core.c:331:16: sparse:    int
--
   drivers/misc/mic/vop/vop_vringh.c:299:27: sparse: sparse: undefined identifier 'vring_size'
   drivers/misc/mic/vop/vop_vringh.c:299:27: sparse: sparse: undefined identifier 'vring_size'
   drivers/misc/mic/vop/vop_vringh.c:299:27: sparse: sparse: incompatible types for operation (-):
>> drivers/misc/mic/vop/vop_vringh.c:299:27: sparse:    bad type
>> drivers/misc/mic/vop/vop_vringh.c:299:27: sparse:    int
   drivers/misc/mic/vop/vop_vringh.c:299:27: sparse: sparse: undefined identifier 'vring_size'
   drivers/misc/mic/vop/vop_vringh.c:299:27: sparse: sparse: incompatible types for operation (-):
>> drivers/misc/mic/vop/vop_vringh.c:299:27: sparse:    bad type
>> drivers/misc/mic/vop/vop_vringh.c:299:27: sparse:    int
   drivers/misc/mic/vop/vop_vringh.c:311:37: sparse: sparse: undefined identifier 'vring_size'
   drivers/misc/mic/vop/vop_vringh.c:324:17: sparse: sparse: undefined identifier 'vring_init'

vim +331 drivers/remoteproc/remoteproc_core.c

c874bf59add0e6 Loic Pallardy         2018-07-27  319  
6db20ea8d85064 Ohad Ben-Cohen        2012-05-17  320  int rproc_alloc_vring(struct rproc_vdev *rvdev, int i)
400e64df6b237e Ohad Ben-Cohen        2011-10-20  321  {
7a186941626d19 Ohad Ben-Cohen        2012-02-13  322  	struct rproc *rproc = rvdev->rproc;
b5ab5e24e960b9 Ohad Ben-Cohen        2012-05-30  323  	struct device *dev = &rproc->dev;
6db20ea8d85064 Ohad Ben-Cohen        2012-05-17  324  	struct rproc_vring *rvring = &rvdev->vring[i];
c0d631570ad54a Sjur Brændeland       2013-02-21  325  	struct fw_rsc_vdev *rsc;
096ee78669d2bc Clement Leger         2020-03-02  326  	int ret, notifyid;
c6aed238b7a9b1 Loic Pallardy         2018-07-27  327  	struct rproc_mem_entry *mem;
096ee78669d2bc Clement Leger         2020-03-02  328  	size_t size;
400e64df6b237e Ohad Ben-Cohen        2011-10-20  329  
7a186941626d19 Ohad Ben-Cohen        2012-02-13  330  	/* actual size of vring (in bytes) */
6db20ea8d85064 Ohad Ben-Cohen        2012-05-17 @331  	size = PAGE_ALIGN(vring_size(rvring->len, rvring->align));
400e64df6b237e Ohad Ben-Cohen        2011-10-20  332  
c6aed238b7a9b1 Loic Pallardy         2018-07-27  333  	rsc = (void *)rproc->table_ptr + rvdev->rsc_offset;
c6aed238b7a9b1 Loic Pallardy         2018-07-27  334  
c6aed238b7a9b1 Loic Pallardy         2018-07-27  335  	/* Search for pre-registered carveout */
c6aed238b7a9b1 Loic Pallardy         2018-07-27  336  	mem = rproc_find_carveout_by_name(rproc, "vdev%dvring%d", rvdev->index,
c6aed238b7a9b1 Loic Pallardy         2018-07-27  337  					  i);
c6aed238b7a9b1 Loic Pallardy         2018-07-27  338  	if (mem) {
c6aed238b7a9b1 Loic Pallardy         2018-07-27  339  		if (rproc_check_carveout_da(rproc, mem, rsc->vring[i].da, size))
c6aed238b7a9b1 Loic Pallardy         2018-07-27  340  			return -ENOMEM;
c6aed238b7a9b1 Loic Pallardy         2018-07-27  341  	} else {
c6aed238b7a9b1 Loic Pallardy         2018-07-27  342  		/* Register carveout in in list */
99cf0361e7af29 Ben Dooks (Codethink  2019-10-17  343) 		mem = rproc_mem_entry_init(dev, NULL, 0,
99cf0361e7af29 Ben Dooks (Codethink  2019-10-17  344) 					   size, rsc->vring[i].da,
c6aed238b7a9b1 Loic Pallardy         2018-07-27  345  					   rproc_alloc_carveout,
c6aed238b7a9b1 Loic Pallardy         2018-07-27  346  					   rproc_release_carveout,
c6aed238b7a9b1 Loic Pallardy         2018-07-27  347  					   "vdev%dvring%d",
c6aed238b7a9b1 Loic Pallardy         2018-07-27  348  					   rvdev->index, i);
c6aed238b7a9b1 Loic Pallardy         2018-07-27  349  		if (!mem) {
c6aed238b7a9b1 Loic Pallardy         2018-07-27  350  			dev_err(dev, "Can't allocate memory entry structure\n");
c6aed238b7a9b1 Loic Pallardy         2018-07-27  351  			return -ENOMEM;
c6aed238b7a9b1 Loic Pallardy         2018-07-27  352  		}
c6aed238b7a9b1 Loic Pallardy         2018-07-27  353  
c6aed238b7a9b1 Loic Pallardy         2018-07-27  354  		rproc_add_carveout(rproc, mem);
400e64df6b237e Ohad Ben-Cohen        2011-10-20  355  	}
400e64df6b237e Ohad Ben-Cohen        2011-10-20  356  
400e64df6b237e Ohad Ben-Cohen        2011-10-20  357  	/*
6db20ea8d85064 Ohad Ben-Cohen        2012-05-17  358  	 * Assign an rproc-wide unique index for this vring
6db20ea8d85064 Ohad Ben-Cohen        2012-05-17  359  	 * TODO: assign a notifyid for rvdev updates as well
6db20ea8d85064 Ohad Ben-Cohen        2012-05-17  360  	 * TODO: support predefined notifyids (via resource table)
400e64df6b237e Ohad Ben-Cohen        2011-10-20  361  	 */
15fc61106a203b Tejun Heo             2013-02-27  362  	ret = idr_alloc(&rproc->notifyids, rvring, 0, 0, GFP_KERNEL);
b39599b7cb8f29 Suman Anna            2013-03-06  363  	if (ret < 0) {
15fc61106a203b Tejun Heo             2013-02-27  364  		dev_err(dev, "idr_alloc failed: %d\n", ret);
7a186941626d19 Ohad Ben-Cohen        2012-02-13  365  		return ret;
400e64df6b237e Ohad Ben-Cohen        2011-10-20  366  	}
15fc61106a203b Tejun Heo             2013-02-27  367  	notifyid = ret;
400e64df6b237e Ohad Ben-Cohen        2011-10-20  368  
48f18f89896338 Bjorn Andersson       2016-10-19  369  	/* Potentially bump max_notifyid */
48f18f89896338 Bjorn Andersson       2016-10-19  370  	if (notifyid > rproc->max_notifyid)
48f18f89896338 Bjorn Andersson       2016-10-19  371  		rproc->max_notifyid = notifyid;
48f18f89896338 Bjorn Andersson       2016-10-19  372  
6db20ea8d85064 Ohad Ben-Cohen        2012-05-17  373  	rvring->notifyid = notifyid;
400e64df6b237e Ohad Ben-Cohen        2011-10-20  374  
c6aed238b7a9b1 Loic Pallardy         2018-07-27  375  	/* Let the rproc know the notifyid of this vring.*/
c0d631570ad54a Sjur Brændeland       2013-02-21  376  	rsc->vring[i].notifyid = notifyid;
400e64df6b237e Ohad Ben-Cohen        2011-10-20  377  	return 0;
400e64df6b237e Ohad Ben-Cohen        2011-10-20  378  }
400e64df6b237e Ohad Ben-Cohen        2011-10-20  379  

:::::: The code at line 331 was first introduced by commit
:::::: 6db20ea8d85064175c7ef594c433c6c2e6bbab83 remoteproc: allocate vrings on demand, free when not needed

:::::: TO: Ohad Ben-Cohen <ohad@wizery.com>
:::::: CC: Ohad Ben-Cohen <ohad@wizery.com>

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

  parent reply	other threads:[~2020-04-08  0:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 16:11 [PATCH v3 0/2] virtio: alignment issues Michael S. Tsirkin
2020-04-06 16:11 ` [PATCH v3 1/2] virtio: stop using legacy struct vring in kernel Michael S. Tsirkin
2020-04-06 20:54   ` kbuild test robot
2020-04-06 20:54     ` kbuild test robot
2020-04-06 22:11   ` kbuild test robot
2020-04-08  0:13   ` kbuild test robot [this message]
2020-04-06 16:12 ` [PATCH v3 2/2] vhost: force spec specified alignment on types Michael S. Tsirkin

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=202004080858.eMqdd5fc%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.