* [PATCH][2.5] small cleanup for __rmqueue
@ 2003-05-10 7:59 Zwane Mwaikambo
2003-05-10 8:15 ` William Lee Irwin III
0 siblings, 1 reply; 2+ messages in thread
From: Zwane Mwaikambo @ 2003-05-10 7:59 UTC (permalink / raw)
To: Linux Kernel; +Cc: William Lee Irwin III
Removes an extra initialisation and general nitpicking.
Index: linux-2.5.69/mm/page_alloc.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.69/mm/page_alloc.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 page_alloc.c
--- linux-2.5.69/mm/page_alloc.c 6 May 2003 12:21:35 -0000 1.1.1.1
+++ linux-2.5.69/mm/page_alloc.c 10 May 2003 04:48:46 -0000
@@ -336,21 +336,17 @@ static void prep_new_page(struct page *p
static struct page *__rmqueue(struct zone *zone, unsigned int order)
{
struct free_area * area;
- unsigned int current_order = order;
- struct list_head *head, *curr;
+ unsigned int current_order;
struct page *page;
unsigned int index;
- for (current_order=order; current_order < MAX_ORDER; ++current_order) {
+ for (current_order = order; current_order < MAX_ORDER; ++current_order) {
area = zone->free_area + current_order;
- head = &area->free_list;
- curr = head->next;
-
if (list_empty(&area->free_list))
continue;
- page = list_entry(curr, struct page, list);
- list_del(curr);
+ page = list_entry(area->free_list.next, struct page, list);
+ list_del(&page->list);
index = page - zone->zone_mem_map;
if (current_order != MAX_ORDER-1)
MARK_USED(index, current_order, area);
--
function.linuxpower.ca
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][2.5] small cleanup for __rmqueue
2003-05-10 7:59 [PATCH][2.5] small cleanup for __rmqueue Zwane Mwaikambo
@ 2003-05-10 8:15 ` William Lee Irwin III
0 siblings, 0 replies; 2+ messages in thread
From: William Lee Irwin III @ 2003-05-10 8:15 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: Linux Kernel
On Sat, May 10, 2003 at 03:59:31AM -0400, Zwane Mwaikambo wrote:
> Removes an extra initialisation and general nitpicking.
Looks good. I like the elimination of the superfluous variables.
-- wli
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-10 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-10 7:59 [PATCH][2.5] small cleanup for __rmqueue Zwane Mwaikambo
2003-05-10 8:15 ` William Lee Irwin III
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.