public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <zhang.songyi@zte.com.cn>
To: <akpm@linux-foundation.org>
Cc: <yuzhao@google.com>, <peterz@infradead.org>, <david@redhat.com>,
	<jgross@suse.com>, <tongtiangen@huawei.com>,
	<liushixin2@huawei.com>, <anshuman.khandual@arm.com>,
	<namit@vmware.com>, <kunyu@nfschina.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH linux-next] mm: remove redundant pte variable
Date: Mon, 28 Nov 2022 21:07:43 +0800 (CST)	[thread overview]
Message-ID: <202211282107437343474@zte.com.cn> (raw)

From: zhang songyi <zhang.songyi@zte.com.cn>

Return value from ptep_get_and_clear_full() directly instead of taking
this in another redundant variable.

Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
 include/linux/pgtable.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 576093de8b1c..1159b25b0542 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -456,9 +456,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
                                            unsigned long address, pte_t *ptep,
                                            int full)
 {
-       pte_t pte;
-       pte = ptep_get_and_clear(mm, address, ptep);
-       return pte;
+       return ptep_get_and_clear(mm, address, ptep);
 }
 #endif

--
2.15.2

                 reply	other threads:[~2022-11-28 13:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202211282107437343474@zte.com.cn \
    --to=zhang.songyi@zte.com.cn \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=david@redhat.com \
    --cc=jgross@suse.com \
    --cc=kunyu@nfschina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liushixin2@huawei.com \
    --cc=namit@vmware.com \
    --cc=peterz@infradead.org \
    --cc=tongtiangen@huawei.com \
    --cc=yuzhao@google.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