>> Function sparse_index_init() is used to setup memory section descriptors >> dynamically. zero should be returned while mem_section[root] already has >> been allocated. > >Why? > When CONFIG_SPARSEMEM_EXTREME is enabled, the memory section descriptors are allocated dynamically and stored into "struct mem_section *mem_section[NR_SECTION_ROOTS]". It's possible for multiple sections (e.g. 0, 1) sharing "mem_section[0]". When setup the descriptor for section 0, the mem_section descriptor for section 1 should have been created as well. So we needn't do same thing (actually duplicate) for section 1. And the function returns "-EEXIST" in sparse_index_init() for section 1, which indicates errors. Actually, here we need "0". Does it make sense? Thanks, Gavin >-- >To unsubscribe, send a message with 'unsubscribe linux-mm' in >the body to majordomo@xxxxxxxxx. For more info on Linux MM, >see: http://www.linux-mm.org/ . >Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a> > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>