Re: [PATCH 3/4] VSOCK DRIVER: support specifying additional cids for host

0 views
Skip to first unread message

kernel test robot

unread,
Aug 2, 2021, 11:56:53 AM8/2/21
to fuguancheng, m...@redhat.com, jaso...@redhat.com, stef...@redhat.com, sgar...@redhat.com, da...@davemloft.net, ku...@kernel.org, arseny....@kaspersky.com, andr...@amazon.com, colin...@canonical.com, clang-bu...@googlegroups.com, kbuil...@lists.01.org, k...@vger.kernel.org
Hi fuguancheng,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on vhost/linux-next]
[also build test WARNING on linus/master v5.14-rc3 next-20210730]
[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/fuguancheng/Add-multi-cid-support-for-vsock-driver/20210802-201017
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: x86_64-randconfig-c001-20210802 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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/a6cda380458b3e954d0a80cbba0e0feb36f3d797
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review fuguancheng/Add-multi-cid-support-for-vsock-driver/20210802-201017
git checkout a6cda380458b3e954d0a80cbba0e0feb36f3d797
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

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

All warnings (new ones prefixed by >>):

>> net/vmw_vsock/virtio_transport.c:448:13: warning: explicitly assigning value of variable of type 'u32' (aka 'unsigned int') to itself [-Wself-assign]
for (index = index; index < vsock->number_cid + vsock->number_host_cid; index++) {
~~~~~ ^ ~~~~~
1 warning generated.


vim +448 net/vmw_vsock/virtio_transport.c

400
401 static void virtio_vsock_update_guest_cid(struct virtio_vsock *vsock)
402 {
403 struct virtio_device *vdev = vsock->vdev;
404 __le64 guest_cid;
405 __le32 number_cid;
406 __le64 host_cid;
407 __le32 number_host_cid;
408 u32 index;
409
410 vdev->config->get(vdev, offsetof(struct virtio_vsock_config, number_cid),
411 &number_cid, sizeof(number_cid));
412 vdev->config->get(vdev, offsetof(struct virtio_vsock_config, number_host_cid),
413 &number_host_cid, sizeof(number_host_cid));
414 vsock->number_cid = le32_to_cpu(number_cid);
415 vsock->number_host_cid = le32_to_cpu(number_host_cid);
416
417 /* number_cid must be greater than 0 in the config space
418 * to use this feature.
419 */
420 if (vsock->number_cid > 0) {
421 vsock->cids = kmalloc_array(vsock->number_cid, sizeof(u32), GFP_KERNEL);
422 if (!vsock->cids) {
423 /* Space allocated failed, reset number_cid to 0.
424 * only use the original guest_cid.
425 */
426 vsock->number_cid = 0;
427 }
428 }
429
430 if (vsock->number_host_cid > 0) {
431 vsock->host_cids = kmalloc_array(vsock->number_host_cid, sizeof(u32), GFP_KERNEL);
432 if (!vsock->host_cids) {
433 /* Space allocated failed, reset number_cid to 0.
434 * only use the original guest_cid.
435 */
436 vsock->number_host_cid = 0;
437 }
438 }
439
440 for (index = 0; index < vsock->number_cid; index++) {
441 vdev->config->get(vdev,
442 offsetof(struct virtio_vsock_config, cids)
443 + index * sizeof(uint64_t),
444 &guest_cid, sizeof(guest_cid));
445 vsock->cids[index] = le64_to_cpu(guest_cid);
446 }
447
> 448 for (index = index; index < vsock->number_cid + vsock->number_host_cid; index++) {
449 vdev->config->get(vdev,
450 offsetof(struct virtio_vsock_config, cids)
451 + index * sizeof(uint64_t),
452 &host_cid, sizeof(host_cid));
453 vsock->host_cids[index - vsock->number_cid] = le64_to_cpu(host_cid);
454 }
455 }
456

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuil...@lists.01.org
.config.gz
Reply all
Reply to author
Forward
0 new messages