public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wei Yang <richardw.yang@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, willy@infradead.org, will@kernel.org,
	peterz@infradead.org, Wei Yang <richardw.yang@linux.intel.com>
Subject: [PATCH] mm: remove redundant assignment of entry
Date: Mon,  8 Jul 2019 16:27:40 +0800	[thread overview]
Message-ID: <20190708082740.21111-1-richardw.yang@linux.intel.com> (raw)

Since ptent will not be changed after previous assignment of entry, it
is not necessary to do the assignment again.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 mm/memory.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index ddf20bd0c317..d108bb979a08 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1127,7 +1127,6 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
 		if (unlikely(details))
 			continue;
 
-		entry = pte_to_swp_entry(ptent);
 		if (!non_swap_entry(entry))
 			rss[MM_SWAPENTS]--;
 		else if (is_migration_entry(entry)) {
-- 
2.17.1


             reply	other threads:[~2019-07-08  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08  8:27 Wei Yang [this message]
2019-07-08 14:42 ` [PATCH] mm: remove redundant assignment of entry Matthew Wilcox
2019-09-14  0:03 ` Wei Yang
2019-09-16 21:15   ` Will Deacon
2019-09-17  2:00     ` Wei Yang

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=20190708082740.21111-1-richardw.yang@linux.intel.com \
    --to=richardw.yang@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    --cc=willy@infradead.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