linux-mips
[Top] [All Lists]

Re: [PATCH] fix some compiler warnings (field width, unused variable)

To: linux-mips@linux-mips.org
Subject: Re: [PATCH] fix some compiler warnings (field width, unused variable)
From: Ulrich Eckhardt <eckhardt@satorlaser.com>
Date: Wed, 7 Jun 2006 11:03:34 +0200
In-reply-to: <20060602.015404.93020143.anemo@mba.ocn.ne.jp>
Organization: Sator Laser GmbH
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060601.010003.39154219.anemo@mba.ocn.ne.jp> <Pine.LNX.4.62.0605311840170.18323@chinchilla.sonytel.be> <20060602.015404.93020143.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: KMail/1.9.1
On Thursday 01 June 2006 18:54, Atsushi Nemoto wrote:
>                       printk("initrd extends beyond end of memory "
> -                            "(0x%0*Lx > 0x%0*Lx)\ndisabling initrd\n",
> -                            width,
> -                            (unsigned long long) CPHYSADDR(initrd_end),
> -                            width,
> -                            (unsigned long long) PFN_PHYS(max_low_pfn));
> +                            "(0x%p > 0x%p)\ndisabling initrd\n",
> +                            (void *)CPHYSADDR(initrd_end),
> +                            (void *)PFN_PHYS(max_low_pfn));

I'm not so sure if this is a good idea because some systems have 36 bit 
physical addresses while they only have 32 bit void pointers, so long long is 
probably really the better solution.

I'm wondering if it would be worth having a special flag in printk to indicate 
a physical address ("%lp" perhaps?) so that you don't get the unimportant 
leading zeroes for the bits 36 to 63 for above mentioned platforms.

Uli


****************************************************
Visit our website at <http://www.domino-printing.com/>
****************************************************
This Email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this Email in error please notify the system manager.

This footnote also confirms that this Email message has been swept by 
MailSweeper for the presence of computer viruses.
****************************************************


<Prev in Thread] Current Thread [Next in Thread>