Skip to content

Commit

Permalink
[PATCH] typeof __page_to_pfn with SPARSEMEM=y
Browse files Browse the repository at this point in the history
With CONFIG_SPARSEMEM=y:

mm/rmap.c:579: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'int'

Make __page_to_pfn() return unsigned long.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed Feb 11, 2007
1 parent 5a88a13 commit f05b628
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-generic/memory_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define __page_to_pfn(pg) \
({ struct page *__pg = (pg); \
int __sec = page_to_section(__pg); \
__pg - __section_mem_map_addr(__nr_to_section(__sec)); \
(unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \
})

#define __pfn_to_page(pfn) \
Expand Down

0 comments on commit f05b628

Please sign in to comment.