On 09/04/15 16:00, Tim Deegan wrote: > At 18:26 +0100 on 07 Apr (1428431176), Andrew Cooper wrote: >> --- a/xen/include/asm-x86/numa.h >> +++ b/xen/include/asm-x86/numa.h >> @@ -9,7 +9,7 @@ >> >> extern int srat_rev; >> >> -extern unsigned char cpu_to_node[]; >> +extern nodeid_t cpu_to_node[NR_CPUS]; > Does the compiler do anything useful with the array size here?
Specifying the size allows ARRAY_SIZE(cpu_to_node) to work in other translation units. It also allows static analysers to perform bounds checks, should they wish. > In particular does it check that it matches the size at the definition? It will complain if they are mismatched. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel