[kvmarm:next 31/83] arch/arm64/kvm/vgic/vgic-irs-v5.c:1016:8: warning: variable 'addr' set but not used
kernel test robot
lkp at intel.com
Tue Sep 15 14:48:32 PDT 2026
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next
head: 8476ce1f1e949a4eae0c0b8f06cf6ab51a3edfd0
commit: 71091136d1452b6125579b210d29efec3e79681a [31/83] KVM: arm64: gic-v5: Handle userspace accesses to IRS MMIO region
config: arm64-randconfig-003-20260916 (https://download.01.org/0day-ci/archive/20260916/202609160555.JW0KTj94-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260916/202609160555.JW0KTj94-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609160555.JW0KTj94-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/arm64/kvm/vgic/vgic-irs-v5.c: In function 'vgic_v5_has_attr_regs':
>> arch/arm64/kvm/vgic/vgic-irs-v5.c:1016:8: warning: variable 'addr' set but not used [-Wunused-but-set-variable]
gpa_t addr, offset;
^~~~
vim +/addr +1016 arch/arm64/kvm/vgic/vgic-irs-v5.c
1010
1011 int vgic_v5_has_attr_regs(struct kvm_device *dev, struct kvm_device_attr *attr)
1012 {
1013 const struct vgic_register_region *region;
1014 struct vgic_reg_attr reg_attr;
1015 struct kvm_vcpu *vcpu;
> 1016 gpa_t addr, offset;
1017 int ret, align;
1018
1019 ret = vgic_v5_parse_attr(dev, attr, ®_attr);
1020 if (ret)
1021 return ret;
1022
1023 vcpu = reg_attr.vcpu;
1024 addr = reg_attr.addr;
1025
1026 if (attr->group == KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS)
1027 return vgic_v5_has_cpu_sysregs_attr(vcpu, attr);
1028
1029 offset = attr->attr;
1030
1031 region = vgic_find_mmio_region(vgic_v5_irs_registers,
1032 ARRAY_SIZE(vgic_v5_irs_registers),
1033 offset);
1034 if (!region)
1035 return -ENXIO;
1036
1037 align = region->access_flags & VGIC_ACCESS_64bit ? 0x7 : 0x3;
1038 if (offset & align)
1039 return -EINVAL;
1040
1041 return 0;
1042 }
1043
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list