Re: [PATCH V2 3/4] vhost_vdpa: don't setup irq offloading when irq_num < 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Zhu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mst-vhost/linux-next]
[also build test WARNING on horms-ipvs/master linus/master v5.17-rc1 next-20220125]
[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/Zhu-Lingshan/vDPA-ifcvf-implement-shared-IRQ-feature/20220125-174020
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: arm-randconfig-c002-20220124 (https://download.01.org/0day-ci/archive/20220126/202201260245.1yTB6YwE-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 997e128e2a78f5a5434fc75997441ae1ee76f8a4)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/9242eae873643db8562d24857da7d05a2950ecfe
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhu-Lingshan/vDPA-ifcvf-implement-shared-IRQ-feature/20220125-174020
        git checkout 9242eae873643db8562d24857da7d05a2950ecfe
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/vhost/

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

All warnings (new ones prefixed by >>):

>> drivers/vhost/vdpa.c:99:6: warning: variable 'irq' is uninitialized when used here [-Wuninitialized]
           if (irq < 0)
               ^~~
   drivers/vhost/vdpa.c:94:14: note: initialize the variable 'irq' to silence this warning
           int ret, irq;
                       ^
                        = 0
   1 warning generated.


vim +/irq +99 drivers/vhost/vdpa.c

    88	
    89	static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, u16 qid)
    90	{
    91		struct vhost_virtqueue *vq = &v->vqs[qid];
    92		const struct vdpa_config_ops *ops = v->vdpa->config;
    93		struct vdpa_device *vdpa = v->vdpa;
    94		int ret, irq;
    95	
    96		if (!ops->get_vq_irq)
    97			return;
    98	
  > 99		if (irq < 0)
   100			return;
   101	
   102		irq = ops->get_vq_irq(vdpa, qid);
   103		irq_bypass_unregister_producer(&vq->call_ctx.producer);
   104		if (!vq->call_ctx.ctx || irq < 0)
   105			return;
   106	
   107		vq->call_ctx.producer.token = vq->call_ctx.ctx;
   108		vq->call_ctx.producer.irq = irq;
   109		ret = irq_bypass_register_producer(&vq->call_ctx.producer);
   110		if (unlikely(ret))
   111			dev_info(&v->dev, "vq %u, irq bypass producer (token %p) registration fails, ret =  %d\n",
   112				 qid, vq->call_ctx.producer.token, ret);
   113	}
   114	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux