lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1446622531-316-1-git-send-email-yalin.wang2010@gmail.com>
Date:	Wed,  4 Nov 2015 15:35:31 +0800
From:	yalin wang <yalin.wang2010@...il.com>
To:	akpm@...ux-foundation.org, kirill.shutemov@...ux.intel.com,
	mgorman@...e.de, hannes@...xchg.org, riel@...hat.com,
	raindel@...lanox.com, willy@...ux.intel.com, boaz@...xistor.com,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:	yalin wang <yalin.wang2010@...il.com>
Subject: [PATCH] mm: change tlb_finish_mmu() to be more simple

This patch remove unneeded *next temp variable,
make this function more simple to read.

Signed-off-by: yalin wang <yalin.wang2010@...il.com>
---
 mm/memory.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 7f3b9f2..f0040ed 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -270,17 +270,16 @@ void tlb_flush_mmu(struct mmu_gather *tlb)
  */
 void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
 {
-	struct mmu_gather_batch *batch, *next;
+	struct mmu_gather_batch *batch;
 
 	tlb_flush_mmu(tlb);
 
 	/* keep the page table cache within bounds */
 	check_pgt_cache();
 
-	for (batch = tlb->local.next; batch; batch = next) {
-		next = batch->next;
+	for (batch = tlb->local.next; batch; batch = batch->next)
 		free_pages((unsigned long)batch, 0);
-	}
+
 	tlb->local.next = NULL;
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ