From: Tim Deegan Subject: Re: [PATCH 2/6] x86/numa: Correct the extern of cpu_to_node Date: Thu, 9 Apr 2015 16:18:11 +0100 Message-ID: <20150409151811.GH34853@deinos.phlegethon.org> References: <1428427580-8854-1-git-send-email-andrew.cooper3@citrix.com> <1428427580-8854-3-git-send-email-andrew.cooper3@citrix.com> <20150409150025.GC34853@deinos.phlegethon.org> <55269540.309@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <55269540.309@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Boris Ostrovsky , Keir Fraser , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org At 16:05 +0100 on 09 Apr (1428595536), Andrew Cooper wrote: > 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. Excellent. In that case, Reviewed-by: Tim Deegan Tim.