Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!news.etla.org!aioe.org!bofh.it!news.nic.it!robomod From: Mel Gorman Newsgroups: linux.kernel Subject: [PATCH 24/28] mm, page_alloc: Remove unnecessary variable from free_pcppages_bulk Date: Fri, 15 Apr 2016 11:20:04 +0200 Message-ID: References: X-Mailer: git-send-email 2.6.4 Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 48 Organization: linux.* mail to news gateway X-Original-Cc: Vlastimil Babka , Jesper Dangaard Brouer , Linux-MM , LKML , Mel Gorman X-Original-Date: Fri, 15 Apr 2016 10:07:51 +0100 X-Original-Message-ID: <1460711275-1130-12-git-send-email-mgorman@techsingularity.net> X-Original-References: <1460710760-32601-1-git-send-email-mgorman@techsingularity.net> <1460711275-1130-1-git-send-email-mgorman@techsingularity.net> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1379613 The original count is never reused so it can be removed. Signed-off-by: Mel Gorman --- mm/page_alloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3a60579342a5..bdcd4087553e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -855,7 +855,6 @@ static void free_pcppages_bulk(struct zone *zone, int count, { int migratetype = 0; int batch_free = 0; - int to_free = count; unsigned long nr_scanned; bool isolated_pageblocks = has_isolate_pageblock(zone); @@ -864,7 +863,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, if (nr_scanned) __mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned); - while (to_free) { + while (count) { struct page *page; struct list_head *list; @@ -884,7 +883,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, /* This is the only non-empty list. Free them all. */ if (batch_free == MIGRATE_PCPTYPES) - batch_free = to_free; + batch_free = count; do { int mt; /* migratetype of the to-be-freed page */ @@ -902,7 +901,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, __free_one_page(page, page_to_pfn(page), zone, 0, mt); trace_mm_page_pcpu_drain(page, 0, mt); - } while (--to_free && --batch_free && !list_empty(list)); + } while (--count && --batch_free && !list_empty(list)); } spin_unlock(&zone->lock); } -- 2.6.4