public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga•com>
To: Tony Breeds <tony@bakeyournoodle•com>
Cc: ppcdev <linuxppc-dev@ozlabs•org>,
	Stephen Rothwell <sfr@canb•auug.org.au>
Subject: Re: [PATCH 5/8] Silence warning in arch/powerpc/mm/ppc_mmu_32.c
Date: Thu, 31 Jul 2008 01:54:13 -0500	[thread overview]
Message-ID: <1c42eb99377e74cc128fa29aee8dc8b8@bga.com> (raw)
In-Reply-To: <20080731152125.2bfec5b7.sfr@canb.auug.org.au>

On Thu Jul 31 at 15:21:25 EST in 2008, Stephen Rothwell wrote:
> On Thu, 31 Jul 2008 13:51:43 +1000 (EST) Tony Breeds <tony at 
> bakeyournoodle.com> wrote:
>>
>> total_memory is a 'phys_addr_t', cast to unsigned long to silence
>> warning.
>>
>> diff --git a/arch/powerpc/mm/ppc_mmu_32.c 
>> b/arch/powerpc/mm/ppc_mmu_32.c
>> index c53145f..9c19655 100644
>> --- a/arch/powerpc/mm/ppc_mmu_32.c
>> +++ b/arch/powerpc/mm/ppc_mmu_32.c
>> @@ -237,7 +237,7 @@ void __init MMU_init_hw(void)
>>       Hash_end = (struct hash_pte *) ((unsigned long)Hash + 
>> Hash_size);
>>
>>       printk("Total memory = %ldMB; using %ldkB for hash table (at 
>> %p)\n",
>> -            total_memory >> 20, Hash_size >> 10, Hash);
>> +            (unsigned long)total_memory >> 20, Hash_size >> 10, 
>> Hash);
>
> Will this ever be built with CONFIG_PHYS_64BIT?

I think that is how warning originates.

But please, cast the result of the shift.  Otherwise it will print 0MB 
instead of 4096MB.

The patches for 4G ram are in on one platform and in progress on a 
second.

milton

  reply	other threads:[~2008-07-31  6:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31  3:51 [PATCH 1/8] Guard linkstation_physmap_partitions Tony Breeds
2008-07-31  3:51 ` [PATCH 2/8] Guard htab_dt_scan_hugepage_blocks appropriately Tony Breeds
2008-07-31  3:51 ` [PATCH 3/8] Silennce warning in arch/powerpc/mm/mem.c Tony Breeds
2008-07-31  3:51 ` [PATCH 5/8] Silence warning in arch/powerpc/mm/ppc_mmu_32.c Tony Breeds
2008-07-31  5:21   ` Stephen Rothwell
2008-07-31  6:54     ` Milton Miller [this message]
2008-08-01  1:40       ` Tony Breeds
2008-07-31  6:58     ` Tony Breeds
2008-07-31  6:57   ` [PATCH v2] Force printing of 'total_memory' to unsigned long long in ppc_mmu_32.c Tony Breeds
2008-08-01  1:38     ` [PATCH v3] " Tony Breeds
2008-07-31  3:51 ` [PATCH 7/8] Guard from_rtc_time() in arch/powerpc/platforms/powermac/time.c Tony Breeds
2008-07-31  3:51 ` [PATCH 8/8] Enable -Werror in arch/powerpc/{kernel,lib,mm,platforms} Tony Breeds
2008-07-31  3:51 ` [PATCH 4/8] Silence warnings in arch/powerpc/platforms/52xx/mpc52xx_pci.c Tony Breeds
2008-07-31  4:08   ` Jon Smirl
2008-07-31  4:21     ` Tony Breeds
2008-07-31  5:27     ` Grant Likely
2008-07-31  3:51 ` [PATCH 6/8] Explictly undefine DEBUG in arch/powerpc/platforms/pseries/eeh_driver.c Tony Breeds
2008-07-31  4:53   ` Michael Ellerman
2008-07-31  6:54   ` [PATCH v2] Guard print_device_node_tree() if #if 0 Tony Breeds

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=1c42eb99377e74cc128fa29aee8dc8b8@bga.com \
    --to=miltonm@bga$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=tony@bakeyournoodle$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox