From 0c05fb567bd22616ff7c99141d76b87dbc5f1977 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 3 May 2012 15:43:48 +1000 Subject: [PATCH] mm: do_migrate_pages(): rename arguments s/from_nodes/from and s/to_nodes/to/. The "_nodes" is redundant - it duplicates the argument's type. Done in a fit of irritation over 80-col issues :( Cc: KAMEZAWA Hiroyuki Cc: KOSAKI Motohiro Cc: Larry Woodman Cc: Mel Gorman Cc: Rik van Riel Signed-off-by: Andrew Morton --- include/linux/mempolicy.h | 9 ++++----- mm/mempolicy.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 7c727a90d70d..4aa42732e47f 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h @@ -225,8 +225,8 @@ static inline void check_highest_zone(enum zone_type k) policy_zone = k; } -int do_migrate_pages(struct mm_struct *mm, - const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags); +int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, + const nodemask_t *to, int flags); #ifdef CONFIG_TMPFS @@ -354,9 +354,8 @@ static inline bool mempolicy_nodemask_intersects(struct task_struct *tsk, return false; } -static inline int do_migrate_pages(struct mm_struct *mm, - const nodemask_t *from_nodes, - const nodemask_t *to_nodes, int flags) +static inline int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, + const nodemask_t *to, int flags) { return 0; } diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 7eb2f4c709fb..03f8e8ef3616 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -957,8 +957,8 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest, * * Returns the number of page that could not be moved. */ -int do_migrate_pages(struct mm_struct *mm, - const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags) +int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, + const nodemask_t *to, int flags) { int busy = 0; int err; @@ -970,7 +970,7 @@ int do_migrate_pages(struct mm_struct *mm, down_read(&mm->mmap_sem); - err = migrate_vmas(mm, from_nodes, to_nodes, flags); + err = migrate_vmas(mm, from, to, flags); if (err) goto out; @@ -1005,7 +1005,7 @@ int do_migrate_pages(struct mm_struct *mm, * moved to an empty node, then there is nothing left worth migrating. */ - tmp = *from_nodes; + tmp = *from; while (!nodes_empty(tmp)) { int s,d; int source = -1; @@ -1028,11 +1028,11 @@ int do_migrate_pages(struct mm_struct *mm, * [0-7] - > [3,4,5] moves only 0,1,2,6,7. */ - if ((nodes_weight(*from_nodes) != nodes_weight(*to_nodes)) && - (node_isset(s, *to_nodes))) + if ((nodes_weight(*from) != nodes_weight(*to)) && + (node_isset(s, *to))) continue; - d = node_remap(s, *from_nodes, *to_nodes); + d = node_remap(s, *from, *to); if (s == d) continue; @@ -1092,8 +1092,8 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist, { } -int do_migrate_pages(struct mm_struct *mm, - const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags) +int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, + const nodemask_t *to, int flags) { return -ENOSYS; } -- 2.39.5