| To: | linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linux-am33-list@redhat.com, liqin.chen@sunplusct.com, x86@kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org |
|---|---|
| Subject: | Make totalhigh_pages of consistent type. |
| From: | Andreas Fenkart <andreas.fenkart@streamunlimited.com> |
| Date: | Wed, 7 Oct 2009 11:49:36 +0200 |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
Printing the value of totalhigh_pages requires casting, see
typical print message:
arch/x86/mm/init_32.c:
printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
"%dk reserved, %dk data, %dk init, %ldk highmem)\n",
nr_free_pages() << (PAGE_SHIFT-10),
num_physpages << (PAGE_SHIFT-10),
codesize >> 10,
reservedpages << (PAGE_SHIFT-10),
datasize >> 10,
initsize >> 10,
(unsigned long)(totalhigh_pages << (PAGE_SHIFT-10)));
The problem is that the type of totalhigh_pages is dependent on
CONFIG_HIGHMEM being set or not.
include/linux/highmem.h:
#ifdef CONFIG_HIGHMEM
extern unsigned long totalhigh_pages;
#else /* CONFIG_HIGHMEM */
-#define totalhigh_pages 0
+#define totalhigh_pages 0UL
...
The patch changes the define, so that totalhigh_pages is of uniform
type in both cases.
Patch is build-tested on x86_32 and ARM
kind regards
Andreas
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Reason for PIO_MASK?, Manuel Lauss |
|---|---|
| Next by Date: | [PATCH 1/1] Make totalhigh_pages unsigned long., Andreas Fenkart |
| Previous by Thread: | Re: [PATCH 1/2] au1000: fix build failure for db1x00 configured for Au1100 SoC, Manuel Lauss |
| Next by Thread: | [PATCH 1/1] Make totalhigh_pages unsigned long., Andreas Fenkart |
| Indexes: | [Date] [Thread] [Top] [All Lists] |