Re: [PATCH v3] KVM: arm64: fix compile error because of shift overflow

From: Marc Zyngier
Date: Wed Aug 10 2022 - 05:08:23 EST


On Wed, 10 Aug 2022 09:34:35 +0800, Yang Yingliang wrote:
> Using GENMASK() to generate the masks of device type and device id, it makes
> code unambiguous, also it can fix the following fix compile error because of
> shift overflow when using low verison gcc(mine version is 7.5):
>
> In function ‘kvm_vm_ioctl_set_device_addr.isra.38’,
> inlined from ‘kvm_arch_vm_ioctl’ at arch/arm64/kvm/arm.c:1454:10:
> ././include/linux/compiler_types.h:354:38: error: call to ‘__compiletime_assert_599’ \
> declared with attribute error: FIELD_GET: mask is not constant
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)

Applied to fixes, thanks!

[1/1] KVM: arm64: fix compile error because of shift overflow
commit: ae3b1da95413614f96ffa23d200929c6f809c807

Cheers,

M.
--
Marc Zyngier <maz@xxxxxxxxxx>