mm: rotate_reclaimable_page() cleanup
[pandora-kernel.git] / mm / pagewalk.c
index b4f27d2..0afd238 100644 (file)
@@ -9,11 +9,15 @@ static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
        int err = 0;
 
        pte = pte_offset_map(pmd, addr);
-       do {
+       for (;;) {
                err = walk->pte_entry(pte, addr, addr + PAGE_SIZE, private);
                if (err)
                       break;
-       } while (pte++, addr += PAGE_SIZE, addr != end);
+               addr += PAGE_SIZE;
+               if (addr == end)
+                       break;
+               pte++;
+       }
 
        pte_unmap(pte);
        return err;
@@ -77,11 +81,11 @@ static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end,
 
 /**
  * walk_page_range - walk a memory map's page tables with a callback
- * @mm - memory map to walk
- * @addr - starting address
- * @end - ending address
- * @walk - set of callbacks to invoke for each level of the tree
- * @private - private data passed to the callback function
+ * @mm: memory map to walk
+ * @addr: starting address
+ * @end: ending address
+ * @walk: set of callbacks to invoke for each level of the tree
+ * @private: private data passed to the callback function
  *
  * Recursively walk the page table for the memory area in a VMA,
  * calling supplied callbacks. Callbacks are called in-order (first