mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] __mod_page_state - pass unsigned long instead of unsigned
@ 2005-06-01 14:59 Benjamin LaHaise
  0 siblings, 0 replies; only message in thread
From: Benjamin LaHaise @ 2005-06-01 14:59 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

By making the offset argument of __mod_page_state an unsigned long instead 
of unsigned, we can avoid forcing the compiler to sign extend a usually 
constant argument.  This saves 1 instruction on x86-64.

		-ben

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
diff -purN v2.6.12-rc5/include/linux/page-flags.h test-rc5/include/linux/page-flags.h
--- v2.6.12-rc5/include/linux/page-flags.h	2005-05-30 13:29:33.000000000 -0400
+++ test-rc5/include/linux/page-flags.h	2005-06-01 10:45:53.000000000 -0400
@@ -137,7 +137,7 @@ struct page_state {
 extern void get_page_state(struct page_state *ret);
 extern void get_full_page_state(struct page_state *ret);
 extern unsigned long __read_page_state(unsigned offset);
-extern void __mod_page_state(unsigned offset, unsigned long delta);
+extern void __mod_page_state(unsigned long offset, unsigned long delta);
 
 #define read_page_state(member) \
 	__read_page_state(offsetof(struct page_state, member))
diff -purN v2.6.12-rc5/mm/page_alloc.c test-rc5/mm/page_alloc.c
--- v2.6.12-rc5/mm/page_alloc.c	2005-05-30 13:29:34.000000000 -0400
+++ test-rc5/mm/page_alloc.c	2005-06-01 10:46:25.000000000 -0400
@@ -1128,7 +1128,7 @@ unsigned long __read_page_state(unsigned
 	return ret;
 }
 
-void __mod_page_state(unsigned offset, unsigned long delta)
+void __mod_page_state(unsigned long offset, unsigned long delta)
 {
 	unsigned long flags;
 	void* ptr;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-01 14:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-01 14:59 [PATCH] __mod_page_state - pass unsigned long instead of unsigned Benjamin LaHaise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®