netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH 2/3] virtio: cache indirect desc for packed
Date: Thu, 28 Oct 2021 08:28:17 +0800	[thread overview]
Message-ID: <202110280851.KtgXxT01-lkp@intel.com> (raw)
In-Reply-To: <20211027061913.76276-3-xuanzhuo@linux.alibaba.com>

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

Hi Xuan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on horms-ipvs/master]
[also build test WARNING on linus/master v5.15-rc7]
[cannot apply to mst-vhost/linux-next next-20211027]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Xuan-Zhuo/virtio-support-cache-indirect-desc/20211027-142025
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
config: hexagon-randconfig-r045-20211027 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/bb65ceda850ed4592d8a940e01926d5e3d33ae92
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xuan-Zhuo/virtio-support-cache-indirect-desc/20211027-142025
        git checkout bb65ceda850ed4592d8a940e01926d5e3d33ae92
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon 

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

All warnings (new ones prefixed by >>):

>> drivers/virtio/virtio_ring.c:1467:7: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
                   n = len / sizeof(struct vring_packed_desc);
                       ^~~
   drivers/virtio/virtio_ring.c:1460:10: note: initialize the variable 'len' to silence this warning
                   u32 len, n;
                          ^
                           = 0
   1 warning generated.


vim +/len +1467 drivers/virtio/virtio_ring.c

  1433	
  1434	static void detach_buf_packed(struct vring_virtqueue *vq,
  1435				      unsigned int id, void **ctx)
  1436	{
  1437		struct vring_desc_state_packed *state = NULL;
  1438		struct vring_packed_desc *desc;
  1439		unsigned int i, curr;
  1440	
  1441		state = &vq->packed.desc_state[id];
  1442	
  1443		/* Clear data ptr. */
  1444		state->data = NULL;
  1445	
  1446		vq->packed.desc_extra[state->last].next = vq->free_head;
  1447		vq->free_head = id;
  1448		vq->vq.num_free += state->num;
  1449	
  1450		if (unlikely(vq->use_dma_api)) {
  1451			curr = id;
  1452			for (i = 0; i < state->num; i++) {
  1453				vring_unmap_state_packed(vq,
  1454					&vq->packed.desc_extra[curr]);
  1455				curr = vq->packed.desc_extra[curr].next;
  1456			}
  1457		}
  1458	
  1459		if (vq->indirect) {
  1460			u32 len, n;
  1461	
  1462			/* Free the indirect table, if any, now that it's unmapped. */
  1463			desc = state->indir_desc;
  1464			if (!desc)
  1465				return;
  1466	
> 1467			n = len / sizeof(struct vring_packed_desc);
  1468	
  1469			if (vq->use_dma_api) {
  1470				len = vq->packed.desc_extra[id].len;
  1471				for (i = 0; i < n; i++)
  1472					vring_unmap_desc_packed(vq, &desc[i]);
  1473			}
  1474	
  1475			desc_cache_put_packed(vq, desc, n);
  1476			state->indir_desc = NULL;
  1477		} else if (ctx) {
  1478			*ctx = state->indir_desc;
  1479		}
  1480	}
  1481	

---
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: 27476 bytes --]

  reply	other threads:[~2021-10-28  0:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27  6:19 [PATCH 0/3] virtio support cache indirect desc Xuan Zhuo
2021-10-27  6:19 ` [PATCH 1/3] virtio: cache indirect desc for split Xuan Zhuo
2021-10-27  8:55   ` Michael S. Tsirkin
2021-10-27 16:33   ` Dongli Zhang
2021-10-27 19:36     ` Michael S. Tsirkin
2021-10-27 17:07   ` Michael S. Tsirkin
2021-10-28  2:16     ` Jason Wang
     [not found]       ` <1635401763.7680635-3-xuanzhuo@linux.alibaba.com>
2021-10-31 14:47         ` Michael S. Tsirkin
2021-10-27 23:02   ` kernel test robot
2021-10-28  0:57   ` kernel test robot
2021-10-27  6:19 ` [PATCH 2/3] virtio: cache indirect desc for packed Xuan Zhuo
2021-10-28  0:28   ` kernel test robot [this message]
2021-10-28  3:51   ` kernel test robot
2021-10-28  7:38   ` kernel test robot
2021-10-27  6:19 ` [PATCH 3/3] virtio-net: enable virtio indirect cache Xuan Zhuo
2021-10-27 15:55   ` Jakub Kicinski
     [not found]     ` <1635386220.8124611-1-xuanzhuo@linux.alibaba.com>
2021-10-28  2:28       ` Jason Wang

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=202110280851.KtgXxT01-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jasowang@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.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).