From: "Jan Beulich" Subject: Re: [PATCH v3 1/3] x86/numa: Allow arbitrary value of PXM in PXM<->node mapping Date: Thu, 26 Feb 2015 08:38:48 +0000 Message-ID: <54EEE9A80200007800063F2B@mail.emea.novell.com> References: <1424907714-10527-1-git-send-email-boris.ostrovsky@oracle.com> <1424907714-10527-2-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1424907714-10527-2-git-send-email-boris.ostrovsky@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: kevin.tian@intel.com, keir@xen.org, ian.campbell@citrix.com, Andrew.Cooper3@citrix.com, dario.faggioli@citrix.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 26.02.15 at 00:41, wrote: > * Made changes to K&R style (which is what this file uses) I don't find anything K&R style here, and I think the compiler would have prevented you from doing any such (by way for issuing warnings and us using -Werror). I'm sure you mean Linux instead. > @@ -111,8 +154,8 @@ static __init void bad_srat(void) > acpi_numa = -1; > for (i = 0; i < MAX_LOCAL_APIC; i++) > apicid_to_node[i] = NUMA_NO_NODE; > - for (i = 0; i < ARRAY_SIZE(pxm2node); i++) > - pxm2node[i] = NUMA_NO_NODE; > + for (i = 0; i < MAX_NUMNODES; i++) > + pxm2node[i].node = NUMA_NO_NODE; It escapes me why the ARRAY_SIZE() use needed replacing. I'm going to undo that before committing, and in fact will adjust other similar bounds checks to use it too. Jan