From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755031AbbKDHfr (ORCPT ); Wed, 4 Nov 2015 02:35:47 -0500 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36445 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754841AbbKDHfq (ORCPT ); Wed, 4 Nov 2015 02:35:46 -0500 From: yalin wang To: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, mgorman@suse.de, hannes@cmpxchg.org, riel@redhat.com, raindel@mellanox.com, willy@linux.intel.com, boaz@plexistor.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: yalin wang Subject: [PATCH] mm: change tlb_finish_mmu() to be more simple Date: Wed, 4 Nov 2015 15:35:31 +0800 Message-Id: <1446622531-316-1-git-send-email-yalin.wang2010@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch remove unneeded *next temp variable, make this function more simple to read. Signed-off-by: yalin wang --- 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