ARM: KVM: Work around older compiler bug
authorChristoffer Dall <christoffer.dall@linaro.org>
Mon, 19 Aug 2013 21:16:57 +0000 (14:16 -0700)
committerChristoffer Dall <christoffer.dall@linaro.org>
Fri, 30 Aug 2013 22:47:58 +0000 (15:47 -0700)
Compilers before 4.6 do not behave well with unnamed fields in structure
initializers and therefore produces build errors:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676

By refering to the unnamed union using braces, both older and newer
compilers produce the same result.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reported-by: Russell King <linux@arm.linux.org.uk>
Tested-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/reset.c

index b7840e7aa4529ac73e34c29e26c0002ef033306d..71e08baee209387f899e14a32fa32e02682b0ae8 100644 (file)
@@ -40,7 +40,7 @@ static struct kvm_regs a15_regs_reset = {
 };
 
 static const struct kvm_irq_level a15_vtimer_irq = {
-       .irq = 27,
+       { .irq = 27 },
        .level = 1,
 };