From: David Hildenbrand <david@redhat.com>
To: Miaohe Lin <linmiaohe@huawei.com>, akpm@linux-foundation.org
Cc: imbrenda@linux.ibm.com, kirill.shutemov@linux.intel.com,
jack@suse.cz, jhubbard@nvidia.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] mm: gup: remove unneed local variable orig_refs
Date: Mon, 9 Aug 2021 11:22:19 +0200 [thread overview]
Message-ID: <6deed9a0-a1fc-161d-b6f7-b1116212fbde@redhat.com> (raw)
In-Reply-To: <20210807093620.21347-3-linmiaohe@huawei.com>
On 07.08.21 11:36, Miaohe Lin wrote:
> Remove unneed local variable orig_refs since refs is unchanged now.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> mm/gup.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index 430495cb1b91..d6056dcab02c 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -117,8 +117,6 @@ __maybe_unused struct page *try_grab_compound_head(struct page *page,
> if (flags & FOLL_GET)
> return try_get_compound_head(page, refs);
> else if (flags & FOLL_PIN) {
> - int orig_refs = refs;
> -
> /*
> * Can't do FOLL_LONGTERM + FOLL_PIN gup fast path if not in a
> * right zone, so fail and let the caller fall back to the slow
> @@ -150,7 +148,7 @@ __maybe_unused struct page *try_grab_compound_head(struct page *page,
> page_ref_add(page, refs * (GUP_PIN_COUNTING_BIAS - 1));
>
> mod_node_page_state(page_pgdat(page), NR_FOLL_PIN_ACQUIRED,
> - orig_refs);
> + refs);
>
> return page;
> }
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2021-08-09 9:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-07 9:36 [PATCH 0/5] Cleanups and fixup for gup Miaohe Lin
2021-08-07 9:36 ` [PATCH 1/5] mm: gup: remove set but unused local variable major Miaohe Lin
2021-08-09 9:21 ` David Hildenbrand
2021-08-07 9:36 ` [PATCH 2/5] mm: gup: remove unneed local variable orig_refs Miaohe Lin
2021-08-09 9:22 ` David Hildenbrand [this message]
2021-08-07 9:36 ` [PATCH 3/5] mm: gup: remove useless BUG_ON in __get_user_pages() Miaohe Lin
2021-08-09 9:23 ` David Hildenbrand
2021-08-07 9:36 ` [PATCH 4/5] mm: gup: fix potential pgmap refcnt leak in __gup_device_huge() Miaohe Lin
2021-08-07 18:41 ` Andrew Morton
2021-08-07 18:45 ` Andrew Morton
2021-08-08 21:16 ` John Hubbard
2021-08-07 9:36 ` [PATCH 5/5] mm: gup: use helper PAGE_ALIGNED in populate_vma_page_range() Miaohe Lin
2021-08-09 9:24 ` David Hildenbrand
2021-08-08 21:13 ` [PATCH 0/5] Cleanups and fixup for gup John Hubbard
2021-08-09 9:39 ` Claudio Imbrenda
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=6deed9a0-a1fc-161d-b6f7-b1116212fbde@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=imbrenda@linux.ibm.com \
--cc=jack@suse.cz \
--cc=jhubbard@nvidia.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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