From mboxrd@z Thu Jan 1 00:00:00 1970 From: santosh.shilimkar@ti.com (Santosh Shilimkar) Date: Fri, 13 Dec 2013 19:44:28 -0500 Subject: [PATCH v3 07/23] mm/memblock: switch to use NUMA_NO_NODE instead of MAX_NUMNODES In-Reply-To: <20131213212912.GL27070@htj.dyndns.org> References: <1386625856-12942-1-git-send-email-santosh.shilimkar@ti.com> <1386625856-12942-8-git-send-email-santosh.shilimkar@ti.com> <20131213212912.GL27070@htj.dyndns.org> Message-ID: <52ABA9EC.5070100@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Friday 13 December 2013 04:29 PM, Tejun Heo wrote: > On Mon, Dec 09, 2013 at 04:50:40PM -0500, Santosh Shilimkar wrote: >> + if (nid == MAX_NUMNODES) >> + pr_warn_once("%s: Usage of MAX_NUMNODES is depricated. Use NUMA_NO_NODE instead\n", >> + __func__); > > Why not just use WARN_ONCE()? We'd want to know who the caller is > anyway. Also, wouldn't something like the following simpler? > > if (WARN_ONCE(nid == MAX_NUMNODES, blah blah)) > nid = NUMA_NO_NODE; > Agree. >> @@ -768,6 +773,11 @@ void __init_memblock __next_free_mem_range_rev(u64 *idx, int nid, >> struct memblock_type *rsv = &memblock.reserved; >> int mi = *idx & 0xffffffff; >> int ri = *idx >> 32; >> + bool check_node = (nid != NUMA_NO_NODE) && (nid != MAX_NUMNODES); >> + >> + if (nid == MAX_NUMNODES) >> + pr_warn_once("%s: Usage of MAX_NUMNODES is depricated. Use NUMA_NO_NODE instead\n", >> + __func__); > > Ditto. > OK. > > Reviwed-by: Tejun Heo > Thanks