[tip:irq/urgent 3/3] drivers/irqchip/irq-gic-v3-its.c:1973:62: error: macro "guard" passed 2 arguments, but takes just 1

From: kernel test robot
Date: Mon Jun 03 2024 - 11:49:48 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/urgent
head: 8dd4302d37bb2fe842acb3be688d393254b4f126
commit: 8dd4302d37bb2fe842acb3be688d393254b4f126 [3/3] irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20240603/202406032312.di8cohFZ-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240603/202406032312.di8cohFZ-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406032312.di8cohFZ-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/irqchip/irq-gic-v3-its.c: In function 'its_irq_set_vcpu_affinity':
>> drivers/irqchip/irq-gic-v3-its.c:1973:62: error: macro "guard" passed 2 arguments, but takes just 1
1973 | guard(raw_spinlock_irq, &its_dev->event_map.vlpi_lock);
| ^
In file included from include/linux/preempt.h:11,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from include/linux/resource_ext.h:11,
from include/linux/acpi.h:13,
from drivers/irqchip/irq-gic-v3-its.c:7:
include/linux/cleanup.h:163: note: macro "guard" defined here
163 | #define guard(_name) \
|
>> drivers/irqchip/irq-gic-v3-its.c:1973:9: error: 'guard' undeclared (first use in this function)
1973 | guard(raw_spinlock_irq, &its_dev->event_map.vlpi_lock);
| ^~~~~
drivers/irqchip/irq-gic-v3-its.c:1973:9: note: each undeclared identifier is reported only once for each function it appears in


vim +/guard +1973 drivers/irqchip/irq-gic-v3-its.c

1963
1964 static int its_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
1965 {
1966 struct its_device *its_dev = irq_data_get_irq_chip_data(d);
1967 struct its_cmd_info *info = vcpu_info;
1968
1969 /* Need a v4 ITS */
1970 if (!is_v4(its_dev->its))
1971 return -EINVAL;
1972
> 1973 guard(raw_spinlock_irq, &its_dev->event_map.vlpi_lock);
1974
1975 /* Unmap request? */
1976 if (!info)
1977 return its_vlpi_unmap(d);
1978
1979 switch (info->cmd_type) {
1980 case MAP_VLPI:
1981 return its_vlpi_map(d, info);
1982
1983 case GET_VLPI:
1984 return its_vlpi_get(d, info);
1985
1986 case PROP_UPDATE_VLPI:
1987 case PROP_UPDATE_AND_INV_VLPI:
1988 return its_vlpi_prop_update(d, info);
1989
1990 default:
1991 return -EINVAL;
1992 }
1993 }
1994

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