mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
mm: section numbers use the type "unsigned long"
Patch series "mm: Further memory block device cleanups", v1. Some further cleanups around memory block devices. Especially, clean up and simplify walk_memory_range(). Including some other minor cleanups. This patch (of 6): We are using a mixture of "int" and "unsigned long". Let's make this consistent by using "unsigned long" everywhere. We'll do the same with memory block ids next. While at it, turn the "unsigned long i" in removable_show() into an int - sections_per_block is an int. [[email protected]: s/unsigned long i/unsigned long nr/] [[email protected]: v3] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Hildenbrand <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Dan Williams <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Wei Yang <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Arun KS <[email protected]> Cc: Pavel Tatashin <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Baoquan He <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
756398750e
commit
2491f0a2c0
3 changed files with 21 additions and 22 deletions
12
mm/sparse.c
12
mm/sparse.c
|
|
@ -102,7 +102,7 @@ static inline int sparse_index_init(unsigned long section_nr, int nid)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_SPARSEMEM_EXTREME
|
||||
int __section_nr(struct mem_section* ms)
|
||||
unsigned long __section_nr(struct mem_section *ms)
|
||||
{
|
||||
unsigned long root_nr;
|
||||
struct mem_section *root = NULL;
|
||||
|
|
@ -121,9 +121,9 @@ int __section_nr(struct mem_section* ms)
|
|||
return (root_nr * SECTIONS_PER_ROOT) + (ms - root);
|
||||
}
|
||||
#else
|
||||
int __section_nr(struct mem_section* ms)
|
||||
unsigned long __section_nr(struct mem_section *ms)
|
||||
{
|
||||
return (int)(ms - mem_section[0]);
|
||||
return (unsigned long)(ms - mem_section[0]);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -178,10 +178,10 @@ void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn,
|
|||
* Keeping track of this gives us an easy way to break out of
|
||||
* those loops early.
|
||||
*/
|
||||
int __highest_present_section_nr;
|
||||
unsigned long __highest_present_section_nr;
|
||||
static void section_mark_present(struct mem_section *ms)
|
||||
{
|
||||
int section_nr = __section_nr(ms);
|
||||
unsigned long section_nr = __section_nr(ms);
|
||||
|
||||
if (section_nr > __highest_present_section_nr)
|
||||
__highest_present_section_nr = section_nr;
|
||||
|
|
@ -189,7 +189,7 @@ static void section_mark_present(struct mem_section *ms)
|
|||
ms->section_mem_map |= SECTION_MARKED_PRESENT;
|
||||
}
|
||||
|
||||
static inline int next_present_section_nr(int section_nr)
|
||||
static inline unsigned long next_present_section_nr(unsigned long section_nr)
|
||||
{
|
||||
do {
|
||||
section_nr++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue