All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android14-6.1 1/1] drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:112:11: warning: variable 'hwirq' set but not used
@ 2026-10-19 11:15 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-19 11:15 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

Hi Alex,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android14-6.1
head:   48e3cd973485465613da6d71fa17139773546573
commit: 083e750c9f5f4c3bf61161330fb84d7c8e8bb417 [1/1] vfio/fsl-mc: Block calling interrupt handler without trigger
config: arm-randconfig-2001-20261018 (https://download.01.org/0day-ci/archive/20261019/202610191314.KoKMIgtr-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/202610191314.KoKMIgtr-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610191314.KoKMIgtr-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:112:11: warning: variable 'hwirq' set but not used [-Wunused-but-set-variable]
     112 |         int ret, hwirq;
         |                  ^
   1 warning generated.


vim +/hwirq +112 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c

cc0ee20bd96971 Diana Craciun   2020-10-05  105  
2e0d29561f593a Diana Craciun   2020-10-05  106  static int vfio_fsl_mc_set_irq_trigger(struct vfio_fsl_mc_device *vdev,
2e0d29561f593a Diana Craciun   2020-10-05  107  				       unsigned int index, unsigned int start,
2e0d29561f593a Diana Craciun   2020-10-05  108  				       unsigned int count, u32 flags,
2e0d29561f593a Diana Craciun   2020-10-05  109  				       void *data)
2e0d29561f593a Diana Craciun   2020-10-05  110  {
cc0ee20bd96971 Diana Craciun   2020-10-05  111  	struct fsl_mc_device *mc_dev = vdev->mc_dev;
cc0ee20bd96971 Diana Craciun   2020-10-05 @112  	int ret, hwirq;
cc0ee20bd96971 Diana Craciun   2020-10-05  113  	struct vfio_fsl_mc_irq *irq;
cc0ee20bd96971 Diana Craciun   2020-10-05  114  	struct device *cont_dev = fsl_mc_cont_dev(&mc_dev->dev);
cc0ee20bd96971 Diana Craciun   2020-10-05  115  	struct fsl_mc_device *mc_cont = to_fsl_mc_device(cont_dev);
cc0ee20bd96971 Diana Craciun   2020-10-05  116  
159246378d8483 Diana Craciun   2020-10-15  117  	if (!count && (flags & VFIO_IRQ_SET_DATA_NONE))
159246378d8483 Diana Craciun   2020-10-15  118  		return vfio_set_trigger(vdev, index, -1);
159246378d8483 Diana Craciun   2020-10-15  119  
cc0ee20bd96971 Diana Craciun   2020-10-05  120  	if (start != 0 || count != 1)
2e0d29561f593a Diana Craciun   2020-10-05  121  		return -EINVAL;
cc0ee20bd96971 Diana Craciun   2020-10-05  122  
da119f387e9464 Jason Gunthorpe 2021-08-05  123  	mutex_lock(&vdev->vdev.dev_set->lock);
cc0ee20bd96971 Diana Craciun   2020-10-05  124  	ret = fsl_mc_populate_irq_pool(mc_cont,
cc0ee20bd96971 Diana Craciun   2020-10-05  125  			FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS);
cc0ee20bd96971 Diana Craciun   2020-10-05  126  	if (ret)
cc0ee20bd96971 Diana Craciun   2020-10-05  127  		goto unlock;
cc0ee20bd96971 Diana Craciun   2020-10-05  128  
cc0ee20bd96971 Diana Craciun   2020-10-05  129  	ret = vfio_fsl_mc_irqs_allocate(vdev);
cc0ee20bd96971 Diana Craciun   2020-10-05  130  	if (ret)
cc0ee20bd96971 Diana Craciun   2020-10-05  131  		goto unlock;
da119f387e9464 Jason Gunthorpe 2021-08-05  132  	mutex_unlock(&vdev->vdev.dev_set->lock);
cc0ee20bd96971 Diana Craciun   2020-10-05  133  
cc0ee20bd96971 Diana Craciun   2020-10-05  134  	if (flags & VFIO_IRQ_SET_DATA_EVENTFD) {
cc0ee20bd96971 Diana Craciun   2020-10-05  135  		s32 fd = *(s32 *)data;
cc0ee20bd96971 Diana Craciun   2020-10-05  136  
cc0ee20bd96971 Diana Craciun   2020-10-05  137  		return vfio_set_trigger(vdev, index, fd);
cc0ee20bd96971 Diana Craciun   2020-10-05  138  	}
cc0ee20bd96971 Diana Craciun   2020-10-05  139  
d86a6d47bcc6b4 Thomas Gleixner 2021-12-10  140  	hwirq = vdev->mc_dev->irqs[index]->virq;
cc0ee20bd96971 Diana Craciun   2020-10-05  141  
cc0ee20bd96971 Diana Craciun   2020-10-05  142  	irq = &vdev->mc_irqs[index];
cc0ee20bd96971 Diana Craciun   2020-10-05  143  
cc0ee20bd96971 Diana Craciun   2020-10-05  144  	if (flags & VFIO_IRQ_SET_DATA_NONE) {
083e750c9f5f4c Alex Williamson 2024-03-29  145  		if (irq->trigger)
083e750c9f5f4c Alex Williamson 2024-03-29  146  			eventfd_signal(irq->trigger, 1);
cc0ee20bd96971 Diana Craciun   2020-10-05  147  
cc0ee20bd96971 Diana Craciun   2020-10-05  148  	} else if (flags & VFIO_IRQ_SET_DATA_BOOL) {
cc0ee20bd96971 Diana Craciun   2020-10-05  149  		u8 trigger = *(u8 *)data;
cc0ee20bd96971 Diana Craciun   2020-10-05  150  
083e750c9f5f4c Alex Williamson 2024-03-29  151  		if (trigger && irq->trigger)
083e750c9f5f4c Alex Williamson 2024-03-29  152  			eventfd_signal(irq->trigger, 1);
cc0ee20bd96971 Diana Craciun   2020-10-05  153  	}
cc0ee20bd96971 Diana Craciun   2020-10-05  154  
cc0ee20bd96971 Diana Craciun   2020-10-05  155  	return 0;
cc0ee20bd96971 Diana Craciun   2020-10-05  156  
cc0ee20bd96971 Diana Craciun   2020-10-05  157  unlock:
da119f387e9464 Jason Gunthorpe 2021-08-05  158  	mutex_unlock(&vdev->vdev.dev_set->lock);
cc0ee20bd96971 Diana Craciun   2020-10-05  159  	return ret;
cc0ee20bd96971 Diana Craciun   2020-10-05  160  

:::::: The code at line 112 was first introduced by commit
:::::: cc0ee20bd96971c10eba9a83ecf1c0733078a083 vfio/fsl-mc: trigger an interrupt via eventfd

:::::: TO: Diana Craciun <diana.craciun@oss.nxp.com>
:::::: CC: Alex Williamson <alex.williamson@redhat.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-19 11:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 11:15 [android-common:android14-6.1 1/1] drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:112:11: warning: variable 'hwirq' set but not used kernel test robot

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.