public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Cc: trivial@rustcorp.com.au
Subject: remove MARK_USED() macros
Date: Sun, 2 Jun 2002 15:31:44 -0700	[thread overview]
Message-ID: <20020602223144.GO14918@holomorphy.com> (raw)

MARK_USED() only has two call sites within page_alloc.c and does not
effectively serve to clarify the code. This patch removes it in favor
of open-coding the __change_bit() at its call sites.


Against 2.5.19.


Cheers,
Bill


===== mm/page_alloc.c 1.69 vs edited =====
--- 1.69/mm/page_alloc.c	Sun Jun  2 15:26:30 2002
+++ edited/mm/page_alloc.c	Sun Jun  2 15:28:11 2002
@@ -153,9 +153,6 @@
 	current->nr_local_pages++;
 }
 
-#define MARK_USED(index, order, area) \
-	__change_bit((index) >> (1+(order)), (area)->map)
-
 static inline struct page * expand (zone_t *zone, struct page *page,
 	 unsigned long index, int low, int high, free_area_t * area)
 {
@@ -167,7 +164,7 @@
 		high--;
 		size >>= 1;
 		list_add(&(page)->list, &(area)->free_list);
-		MARK_USED(index, high, area);
+		__change_bit(index >> (1+high), area->map);
 		index += size;
 		page += size;
 	}
@@ -197,7 +194,7 @@
 			list_del(curr);
 			index = page - zone->zone_mem_map;
 			if (curr_order != MAX_ORDER-1)
-				MARK_USED(index, curr_order, area);
+				__change_bit(index >> (1+curr_order), area->map);
 			zone->free_pages -= 1UL << order;
 
 			page = expand(zone, page, index, order, curr_order, area);

                 reply	other threads:[~2002-06-02 22:32 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=20020602223144.GO14918@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    /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