From: ebiederm+eric@ccr.net (Eric W. Biederman)
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.rutgers.edu
Subject: [PATCH] tweak page_address
Date: 23 May 1999 13:43:20 -0500 [thread overview]
Message-ID: <m1aeuvsk3b.fsf@flinx.ccr.net> (raw)
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/
reply other threads:[~1999-05-23 19:27 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=m1aeuvsk3b.fsf@flinx.ccr.net \
--to=ebiederm+eric@ccr.net \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.com \
/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.