diff mbox series

[160/181] mm: remove unused alloc_page_vma_node()

Message ID 20201013235711.ZFwbFW_m2%akpm@linux-foundation.org (mailing list archive)
State New, archived
Headers show
Series [001/181] compiler-clang: add build check for clang 10.0.1 | expand

Commit Message

Andrew Morton Oct. 13, 2020, 11:57 p.m. UTC
From: Wei Yang <richard.weiyang@linux.alibaba.com>
Subject: mm: remove unused alloc_page_vma_node()

No one use this macro anymore.

Also fix code style of policy_node().

Link: https://lkml.kernel.org/r/20200921021401.84508-1-richard.weiyang@linux.alibaba.com
Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/gfp.h |    2 --
 mm/mempolicy.c      |    3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

--- a/include/linux/gfp.h~mm-remove-unused-alloc_page_vma_node
+++ a/include/linux/gfp.h
@@ -562,8 +562,6 @@  extern struct page *alloc_pages_vma(gfp_
 #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
 #define alloc_page_vma(gfp_mask, vma, addr)			\
 	alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id(), false)
-#define alloc_page_vma_node(gfp_mask, vma, addr, node)		\
-	alloc_pages_vma(gfp_mask, 0, vma, addr, node, false)
 
 extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
 extern unsigned long get_zeroed_page(gfp_t gfp_mask);
--- a/mm/mempolicy.c~mm-remove-unused-alloc_page_vma_node
+++ a/mm/mempolicy.c
@@ -1882,8 +1882,7 @@  nodemask_t *policy_nodemask(gfp_t gfp, s
 }
 
 /* Return the node id preferred by the given mempolicy, or the given id */
-static int policy_node(gfp_t gfp, struct mempolicy *policy,
-								int nd)
+static int policy_node(gfp_t gfp, struct mempolicy *policy, int nd)
 {
 	if (policy->mode == MPOL_PREFERRED && !(policy->flags & MPOL_F_LOCAL))
 		nd = policy->v.preferred_node;