Skip to contentSkip to conversation

mm/page_alloc: redundant definition variables of pfn in for loop

PATCH New huxiang 1 participant 1 message Apr 1, 2021

Subsystems (2)
lore
Share & tools
lore

huxiang

author
#0 lore raw

PATCH 1/1 mm/page_alloc: redundant definition variables of pfn in for loop

This variable pfn is defined repeatedly, so it can be deleted.

---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c +1 -1
index cfc728739..740224232 100644
@@ -3277,7 +3277,7 @@ void free_unref_page_list(struct list_head *list)
 
 	local_irq_save(flags);
 	list_for_each_entry_safe(page, next, list, lru) {
-		unsigned long pfn = page_private(page);
+		pfn = page_private(page);
 
 		set_page_private(page, 0);
 		trace_mm_page_free_batched(page);
Signature · 1 line
2.20.1