* [PATCH] mm: memcontrol: remove the useless parameter for mc_handle_swap_pte
@ 2016-05-25 2:57 ` roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w
0 siblings, 0 replies; 4+ messages in thread
From: roy.qing.li @ 2016-05-25 2:57 UTC (permalink / raw)
To: cgroups, linux-mm; +Cc: hannes, mhocko, vdavydov
From: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
mm/memcontrol.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 36b7ecf..c628c90 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -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);
--
2.1.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mm: memcontrol: remove the useless parameter for mc_handle_swap_pte
@ 2016-05-25 2:57 ` roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w
0 siblings, 0 replies; 4+ messages in thread
From: roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w @ 2016-05-25 2:57 UTC (permalink / raw)
To: cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg
Cc: hannes-druUgvl0LCNAfugRpC6u6w, mhocko-DgEjT+Ai2ygdnm+yROfE0A,
vdavydov-5HdwGun5lf+gSpxsJD1C4w
From: Li RongQing <roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Li RongQing <roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
mm/memcontrol.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 36b7ecf..c628c90 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -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);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: memcontrol: remove the useless parameter for mc_handle_swap_pte
@ 2016-05-25 15:18 ` Michal Hocko
0 siblings, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2016-05-25 15:18 UTC (permalink / raw)
To: roy.qing.li; +Cc: cgroups, linux-mm, hannes, vdavydov
On Wed 25-05-16 10:57:06, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
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.
"
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks
> ---
> mm/memcontrol.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 36b7ecf..c628c90 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -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);
>
> --
> 2.1.4
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: memcontrol: remove the useless parameter for mc_handle_swap_pte
@ 2016-05-25 15:18 ` Michal Hocko
0 siblings, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2016-05-25 15:18 UTC (permalink / raw)
To: roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
hannes-druUgvl0LCNAfugRpC6u6w, vdavydov-5HdwGun5lf+gSpxsJD1C4w
On Wed 25-05-16 10:57:06, roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> From: Li RongQing <roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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.
"
> Signed-off-by: Li RongQing <roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Acked-by: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>
Thanks
> ---
> mm/memcontrol.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 36b7ecf..c628c90 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -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);
>
> --
> 2.1.4
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-25 15:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-25 2:57 [PATCH] mm: memcontrol: remove the useless parameter for mc_handle_swap_pte roy.qing.li
2016-05-25 2:57 ` roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w
2016-05-25 15:18 ` Michal Hocko
2016-05-25 15:18 ` Michal Hocko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.