From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <jbeulich@novell.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Glauber de Oliveira Costa <glommer@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] x86: clean up asm-x86/page*.h
Date: Fri, 14 Dec 2007 00:44:03 -0800 [thread overview]
Message-ID: <47624253.7060507@goop.org> (raw)
In-Reply-To: <47624D81.76E4.0078.0@novell.com>
Jan Beulich wrote:
>> --- a/arch/x86/mm/fault_64.c
>> +++ b/arch/x86/mm/fault_64.c
>> @@ -158,22 +158,22 @@ void dump_pagetable(unsigned long addres
>> pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK);
>> pgd += pgd_index(address);
>> if (bad_address(pgd)) goto bad;
>> - printk("PGD %lx ", pgd_val(*pgd));
>> + printk("PGD %lx ", (unsigned long)pgd_val(*pgd));
>>
>
> Casts like this here and elsewhere look rather odd (in fact I think using
> casts should really be limited to places where you either can't do it
> differently or the code would become badly readable or much uglier
> without them). I would therefore favor simply using the right formatting
> specifier here.
I would agree, but pgd_val() is defined as returning a pgdval_t, which
is typedefed to be unsigned long. I'll have another look, but I don't
think there's an appropriate format for this.
J
next prev parent reply other threads:[~2007-12-14 8:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 8:12 [PATCH 1/4] x86: clean up asm-x86/page*.h Jeremy Fitzhardinge
2007-12-14 8:31 ` Jan Beulich
2007-12-14 8:44 ` Jeremy Fitzhardinge [this message]
2007-12-14 8:53 ` Jan Beulich
2007-12-14 11:55 ` Glauber de Oliveira Costa
2007-12-14 9:28 ` Ingo Molnar
2007-12-14 15:46 ` Jeremy Fitzhardinge
2007-12-14 10:10 ` Harvey Harrison
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=47624253.7060507@goop.org \
--to=jeremy@goop.org \
--cc=glommer@gmail.com \
--cc=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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