mm: memcontrol: remove the useless parameter for mc_handle_swap_pte
Subsystems (3)
PATCH 1/1 mm: memcontrol: remove the useless parameter for mc_handle_swap_pte
From: Li RongQing <[email protected]>
Signed-off-by Li RongQing <[email protected]>
--- mm/memcontrol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/memcontrol.c +3 -3
@@ -4386,7 +4386,7 @@ static struct page *mc_handle_present_pte(struct vm_area_struct *vma,#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);
@@ -4405,7 +4405,7 @@ static struct page *mc_handle_swap_pte(struct vm_area_struct *vma, }#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 ; }
@@ -4570,7 +4570,7 @@ static enum mc_target_type get_mctgt_type(struct vm_area_struct *vma,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);
Signature · 1 line
2.1.4
Quoted 1 line · On Wed 25-05-16 10:57:06, [email protected]…
From: Li RongQing <[email protected]>
It is really trivial but I would add:
"
It reall seems like this parameter has never been used since 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 to get rid of it.
"
Quoted 1 line
Signed-off-by Li RongQing <[email protected]>
Thanks
Quoted 37 lines
--- mm/memcontrol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)mm/memcontrol.c +3
-3@@ -4386,7 +4386,7 @@ static struct page *mc_handle_present_pte(struct vm_area_struct *vma,#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);@@ -4405,7 +4405,7 @@ static struct page *mc_handle_swap_pte(struct vm_area_struct *vma, }#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 ; }@@ -4570,7 +4570,7 @@ static enum mc_target_type get_mctgt_type(struct vm_area_struct *vma,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);Signature · 1 line
2.1.4
Signature · 2 lines
Michal Hocko SUSE Labs