From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Hui Zhu <teawaterz@linux.alibaba.com>,
akpm@linux-foundation.org, david@redhat.com, avagin@google.com,
peterx@redhat.com, hughd@google.com, ryan.roberts@arm.com,
wangkefeng.wang@huawei.com, Liam.Howlett@Oracle.com,
adobriyan@gmail.com, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
teawater@gmail.com, Hui Zhu <teawater@antgroup.com>
Subject: Re: [PATCH] fs/proc/task_mmu.c: add_to_pagemap: Remove useless parameter addr
Date: Thu, 11 Jan 2024 14:04:36 +0500 [thread overview]
Message-ID: <31c2d7d7-eaee-4730-9d27-05740f8ef911@collabora.com> (raw)
In-Reply-To: <20240111084533.40038-1-teawaterz@linux.alibaba.com>
On 1/11/24 1:45 PM, Hui Zhu wrote:
> From: Hui Zhu <teawater@antgroup.com>
>
> Function parameters addr of add_to_pagemap is useless.
> This commit remove it.
>
> Signed-off-by: Hui Zhu <teawater@antgroup.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
> fs/proc/task_mmu.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 62b16f42d5d2..882e2569fc31 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -1352,8 +1352,7 @@ static inline pagemap_entry_t make_pme(u64 frame, u64 flags)
> return (pagemap_entry_t) { .pme = (frame & PM_PFRAME_MASK) | flags };
> }
>
> -static int add_to_pagemap(unsigned long addr, pagemap_entry_t *pme,
> - struct pagemapread *pm)
> +static int add_to_pagemap(pagemap_entry_t *pme, struct pagemapread *pm)
> {
> pm->buffer[pm->pos++] = *pme;
> if (pm->pos >= pm->len)
> @@ -1380,7 +1379,7 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end,
> hole_end = end;
>
> for (; addr < hole_end; addr += PAGE_SIZE) {
> - err = add_to_pagemap(addr, &pme, pm);
> + err = add_to_pagemap(&pme, pm);
> if (err)
> goto out;
> }
> @@ -1392,7 +1391,7 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end,
> if (vma->vm_flags & VM_SOFTDIRTY)
> pme = make_pme(0, PM_SOFT_DIRTY);
> for (; addr < min(end, vma->vm_end); addr += PAGE_SIZE) {
> - err = add_to_pagemap(addr, &pme, pm);
> + err = add_to_pagemap(&pme, pm);
> if (err)
> goto out;
> }
> @@ -1519,7 +1518,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
> for (; addr != end; addr += PAGE_SIZE) {
> pagemap_entry_t pme = make_pme(frame, flags);
>
> - err = add_to_pagemap(addr, &pme, pm);
> + err = add_to_pagemap(&pme, pm);
> if (err)
> break;
> if (pm->show_pfn) {
> @@ -1547,7 +1546,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
> pagemap_entry_t pme;
>
> pme = pte_to_pagemap_entry(pm, vma, addr, ptep_get(pte));
> - err = add_to_pagemap(addr, &pme, pm);
> + err = add_to_pagemap(&pme, pm);
> if (err)
> break;
> }
> @@ -1597,7 +1596,7 @@ static int pagemap_hugetlb_range(pte_t *ptep, unsigned long hmask,
> for (; addr != end; addr += PAGE_SIZE) {
> pagemap_entry_t pme = make_pme(frame, flags);
>
> - err = add_to_pagemap(addr, &pme, pm);
> + err = add_to_pagemap(&pme, pm);
> if (err)
> return err;
> if (pm->show_pfn && (flags & PM_PRESENT))
--
BR,
Muhammad Usama Anjum
prev parent reply other threads:[~2024-01-11 9:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 8:45 Hui Zhu
2024-01-11 9:04 ` Muhammad Usama Anjum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=31c2d7d7-eaee-4730-9d27-05740f8ef911@collabora.com \
--to=usama.anjum@collabora.com \
--cc=Liam.Howlett@Oracle.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@google.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterx@redhat.com \
--cc=ryan.roberts@arm.com \
--cc=teawater@antgroup.com \
--cc=teawater@gmail.com \
--cc=teawaterz@linux.alibaba.com \
--cc=wangkefeng.wang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®