From: Rajagopal Ananthanarayanan <ananth@sgi.com>
To: riel@conectiva.com.br
Cc: linux-mm@kvack.org
Subject: [PATCH] A code cleanup change
Date: Tue, 26 Sep 2000 17:29:19 -0700 [thread overview]
Message-ID: <39D13F5F.9C7F28D6@sgi.com> (raw)
A simple change to get rid of a few magic numbers.
Not included in the patch, one could also use a simple array
for the triplet page_{min,low,high} with the same PAGE_{MIN,LOW,HIGH} index
definitions. The switch in __alloc_pages_limit will be
gone; other places will have to be modified, but
won't incur any extra cost.
Patch against test9-pre7:
==================
--- ./mm/page_alloc.c.orig Tue Sep 26 13:55:48 2000
+++ ./mm/page_alloc.c Tue Sep 26 13:56:41 2000
@@ -258,13 +258,13 @@
*/
switch (limit) {
default:
- case 0:
+ case PAGES_MIN:
water_mark = z->pages_min;
break;
- case 1:
+ case PAGES_LOW:
water_mark = z->pages_low;
break;
- case 2:
+ case PAGES_HIGH:
water_mark = z->pages_high;
}
=====================
--
--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
reply other threads:[~2000-09-27 0:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=39D13F5F.9C7F28D6@sgi.com \
--to=ananth@sgi.com \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.