* [PATCH] tweak page_address
@ 1999-05-23 18:43 Eric W. Biederman
0 siblings, 0 replies; only message in thread
From: Eric W. Biederman @ 1999-05-23 18:43 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-mm, linux-kernel
Replace a multiplication by a shift in page_address.
The compiler probably already does but why take chances.
Eric
diff -uNrX linux-ignore-files linux-2.3.3.eb2/include/linux/pagemap.h linux-2.3.3.eb3/include/linux/pagemap.h
--- linux-2.3.3.eb2/include/linux/pagemap.h Sun May 16 21:55:28 1999
+++ linux-2.3.3.eb3/include/linux/pagemap.h Tue May 18 01:13:39 1999
@@ -14,7 +14,7 @@
static inline unsigned long page_address(struct page * page)
{
- return PAGE_OFFSET + PAGE_SIZE * (page - mem_map);
+ return PAGE_OFFSET + ((page - mem_map) << PAGE_SHIFT);
}
/*
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-05-23 19:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-23 18:43 [PATCH] tweak page_address Eric W. Biederman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox