The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] page_alloc.c and mincore.c
@ 2002-10-08 18:31 Matti Annala
  2002-10-08 18:43 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Matti Annala @ 2002-10-08 18:31 UTC (permalink / raw)
  To: linux-kernel

This one removes a strange unused parameter in balance_classzone() and also slightly cleans up __alloc_pages().

--- page_alloc.c.orig 2002-10-06 19:46:06.000000000 +0300
+++ page_alloc.c 2002-10-06 19:47:52.000000000 +0300
@@ -259,17 +259,17 @@
 
 static /* inline */ struct page *
 balance_classzone(struct zone* classzone, unsigned int gfp_mask,
-   unsigned int order, int * freed)
+   unsigned int order)
 {
  struct page * page = NULL;
- int __freed = 0;
+ int freed = 0;
 
  BUG_ON(in_interrupt());
 
  current->allocation_order = order;
  current->flags |= PF_MEMALLOC | PF_FREE_PAGES;
 
- __freed = try_to_free_pages(classzone, gfp_mask, order);
+ freed = try_to_free_pages(classzone, gfp_mask, order);
 
  current->flags &= ~(PF_MEMALLOC | PF_FREE_PAGES);
 
@@ -280,7 +280,7 @@
 
   local_pages = &current->local_pages;
 
-  if (likely(__freed)) {
+  if (likely(freed)) {
    /* pick from the last inserted so we're lifo */
    entry = local_pages->next;
    do {
@@ -306,7 +306,6 @@
   }
   current->nr_local_pages = 0;
  }
- *freed = __freed;
  return page;
 }
 
@@ -320,7 +319,7 @@
  unsigned long min;
  struct zone **zones, *classzone;
  struct page * page;
- int freed, i;
+ int i;
 
  if (gfp_mask & __GFP_WAIT)
   might_sleep();
@@ -397,7 +396,7 @@
   goto nopage;
 
  inc_page_state(allocstall);
- page = balance_classzone(classzone, gfp_mask, order, &freed);
+ page = balance_classzone(classzone, gfp_mask, order);
  if (page)
   return page;
 
------------------------------

This one fixes a typo in mm/mincore.c

--- mincore.c.orig 2002-10-06 19:51:10.000000000 +0300
+++ mincore.c 2002-10-06 19:51:20.000000000 +0300
@@ -59,7 +59,7 @@
   return error;
 
  /* (end - start) is # of pages, and also # of bytes in "vec */
- remaining = (end - start),
+ remaining = (end - start);
 
  error = 0;
  for (i = 0; remaining > 0; remaining -= PAGE_SIZE, i++) {



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-08 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-08 18:31 [PATCH] page_alloc.c and mincore.c Matti Annala
2002-10-08 18:43 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox