msm: mm: Fix errors when turning on SPARSEMEM
Carry forward the fix from 2.6.29b kernel to handle the NR_SECTION_ROOTS == 0 case when turning on SPARSEMEM on MSM. Also fix the linux coding style typos by replacing "foo* bar" with "foo *bar". Change-Id: I77f259f3d62980a37f4ae7c4680a3617c9b4f563 Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org> (cherry picked from commit 1ff28b9751596dbaf55a3e40f593d3013380a3ac)
This commit is contained in:
committed by
Stephen Boyd
parent
321d16d801
commit
4fe9e26803
@@ -121,8 +121,10 @@ static inline int sparse_index_init(unsigned long section_nr, int nid)
|
||||
int __section_nr(struct mem_section* ms)
|
||||
{
|
||||
unsigned long root_nr;
|
||||
struct mem_section* root;
|
||||
struct mem_section *root;
|
||||
|
||||
if (NR_SECTION_ROOTS == 0)
|
||||
return ms - __nr_to_section(0);
|
||||
for (root_nr = 0; root_nr < NR_SECTION_ROOTS; root_nr++) {
|
||||
root = __nr_to_section(root_nr * SECTIONS_PER_ROOT);
|
||||
if (!root)
|
||||
|
||||
Reference in New Issue
Block a user