[patch 026/126] mm/memcontrol.c: remove the useless parameter for mc_handle_swap_pte

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Li RongQing <roy.qing.li@xxxxxxxxx>
Subject: mm/memcontrol.c: remove the useless parameter for mc_handle_swap_pte

It seems like this parameter has never been used since being introduced by
90254a65833b ("memcg: clean up move charge").  Not a big deal because I
assume the function would get inlined into the caller anyway but why not
get rid of it.

[mhocko@xxxxxxxx: wrote changelog]
  Link: http://lkml.kernel.org/r/20160525151831.GJ20132@xxxxxxxxxxxxxx
Link: http://lkml.kernel.org/r/1464145026-26693-1-git-send-email-roy.qing.li@xxxxxxxxx
Signed-off-by: Li RongQing <roy.qing.li@xxxxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memcontrol.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -puN mm/memcontrol.c~mm-memcontrol-remove-the-useless-parameter-for-mc_handle_swap_pte mm/memcontrol.c
--- a/mm/memcontrol.c~mm-memcontrol-remove-the-useless-parameter-for-mc_handle_swap_pte
+++ a/mm/memcontrol.c
@@ -4409,7 +4409,7 @@ static struct page *mc_handle_present_pt
 
 #ifdef CONFIG_SWAP
 static struct page *mc_handle_swap_pte(struct vm_area_struct *vma,
-			unsigned long addr, pte_t ptent, swp_entry_t *entry)
+			pte_t ptent, swp_entry_t *entry)
 {
 	struct page *page = NULL;
 	swp_entry_t ent = pte_to_swp_entry(ptent);
@@ -4428,7 +4428,7 @@ static struct page *mc_handle_swap_pte(s
 }
 #else
 static struct page *mc_handle_swap_pte(struct vm_area_struct *vma,
-			unsigned long addr, pte_t ptent, swp_entry_t *entry)
+			pte_t ptent, swp_entry_t *entry)
 {
 	return NULL;
 }
@@ -4593,7 +4593,7 @@ static enum mc_target_type get_mctgt_typ
 	if (pte_present(ptent))
 		page = mc_handle_present_pte(vma, addr, ptent);
 	else if (is_swap_pte(ptent))
-		page = mc_handle_swap_pte(vma, addr, ptent, &ent);
+		page = mc_handle_swap_pte(vma, ptent, &ent);
 	else if (pte_none(ptent))
 		page = mc_handle_file_pte(vma, addr, ptent, &ent);
 
_
--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]
  Powered by Linux