The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Matti Annala" <gval@mbnet.fi>
To: <linux-kernel@vger.kernel.org>
Subject: [PATCH] page_alloc.c and mincore.c
Date: Tue, 8 Oct 2002 21:31:56 +0300	[thread overview]
Message-ID: <001101c26ef8$fcd41f20$4fa564c2@windows> (raw)

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++) {



             reply	other threads:[~2002-10-08 18:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-08 18:31 Matti Annala [this message]
2002-10-08 18:43 ` [PATCH] page_alloc.c and mincore.c Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001101c26ef8$fcd41f20$4fa564c2@windows' \
    --to=gval@mbnet.fi \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox