]> xenbits.xensource.com Git - xen.git/commit
x86: avoid overriding initialisers in arrays
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Feb 2016 15:44:01 +0000 (16:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 11 Feb 2016 15:44:01 +0000 (16:44 +0100)
commitdab76ffdfa29ac3e50d908649638decb32c14483
treef2b5a942b1c2308409e090e3691f55b13562a472
parent1be853024d79ef46748c7ced1684000dd708cc8c
x86: avoid overriding initialisers in arrays

Clang objects to having multiple initialisers when creating an array.

As this warning is useful for spotting obscure bugs, disabling it is
unhelpful.  Instead, fix our two deliberate usecases.

In the p2m-ept case, pull the array out into a helper function, so the helper
can guarentee to cover the NULL pointer case.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/mtrr/generic.c
xen/arch/x86/mm/p2m-ept.c