mm-memblock-use-warn_once-when-max_numnodes-passed-as-input-parameter.patch removed from -mm tree
[email protected]
maintainerSubject: [merged] mm-memblock-use-warn_once-when-max_numnodes-passed-as-input-parameter.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 22 Jan 2014 12:14:32 -0800
The patch titled
Subject: mm/memblock: use WARN_ONCE when MAX_NUMNODES passed as input parameter
has been removed from the -mm tree. Its filename was
mm-memblock-use-warn_once-when-max_numnodes-passed-as-input-parameter.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Grygorii Strashko <[email protected]>
Subject: mm/memblock: use WARN_ONCE when MAX_NUMNODES passed as input parameter
Check nid parameter and produce warning if it has deprecated MAX_NUMNODES value. Also re-assign NUMA_NO_NODE value to the nid parameter in this case.
These will help to identify the wrong API usage (the caller) and make code simpler.
---
mm/memblock.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-)
mm/memblock.c renamed from mm/memblock.c~mm-memblock-use-warn_once-when-max_numnodes-passed-as-input-parameter +8 -13
@@ -785,11 +785,9 @@ void __init_memblock __next_free_mem_ranstruct 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 deprecated. Use NUMA_NO_NODE instead\n" , - __func__); +if (WARN_ONCE (nid ==MAX_NUMNODES ,"Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n" )) + nid =NUMA_NO_NODE ;for ( ; mi < mem->cnt; mi++) {struct memblock_region *m = &mem->regions[mi];
@@ -797,7 +795,7 @@ void __init_memblock __next_free_mem_ranphys_addr_t m_end = m->base + m->size;/* only memory regions are associated with nodes, check it */ -if (check_node && nid !=memblock_get_region_node (m)) +if (nid !=NUMA_NO_NODE && nid !=memblock_get_region_node (m))continue ;/* scan areas before each reservation for intersection */
@@ -858,11 +856,9 @@ void __init_memblock __next_free_mem_ranstruct 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 deprecated. Use NUMA_NO_NODE instead\n" , - __func__); +if (WARN_ONCE (nid ==MAX_NUMNODES ,"Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n" )) + nid =NUMA_NO_NODE ;if (*idx == (u64 )ULLONG_MAX ) { mi = mem->cnt -1 ;
@@ -875,7 +871,7 @@ void __init_memblock __next_free_mem_ranphys_addr_t m_end = m->base + m->size;/* only memory regions are associated with nodes, check it */ -if (check_node && nid !=memblock_get_region_node (m)) +if (nid !=NUMA_NO_NODE && nid !=memblock_get_region_node (m))continue ;/* skip hotpluggable memory regions if needed */
@@ -1067,9 +1063,8 @@ static void * __init memblock_virt_allocphys_addr_t alloc;void *ptr; -if (nid ==MAX_NUMNODES ) -pr_warn ("%s: usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE\n" , - __func__); +if (WARN_ONCE (nid ==MAX_NUMNODES ,"Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n" )) + nid =NUMA_NO_NODE ;/* * Detect any accidental use of these APIs after slab is ready, as at
_
Patches currently in -mm which might be from [email protected] are
origin.patch
mm-nobootmem-free_all_bootmem-again.patch
rtc-rtc-twl-use-devm_-functions.patch
rtc-rtc-vr41xx-use-devm_-functions.patch
linux-next.patch