All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
To: Alexander Beregalov <a.beregalov@gmail.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/io_apic_32: fix printk format warning
Date: Mon, 13 Oct 2008 14:22:54 -0700	[thread overview]
Message-ID: <48F3BC2E.5030601@ct.jp.nec.com> (raw)
In-Reply-To: <20081011234130.GE25563@orion>

Alexander Beregalov wrote:
> arch/x86/kernel/io_apic_32.c: In function 'print_local_APIC':
> arch/x86/kernel/io_apic_32.c:1539: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'u64'
> arch/x86/kernel/io_apic_32.c:1540: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'u64'
> 
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
> ---
> 
>  arch/x86/kernel/io_apic_32.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
> index e710289..f678d12 100644
> --- a/arch/x86/kernel/io_apic_32.c
> +++ b/arch/x86/kernel/io_apic_32.c
> @@ -1536,8 +1536,8 @@ __apicdebuginit(void) print_local_APIC(void *dummy)
>  	}
>  
>  	icr = apic_icr_read();
> -	printk(KERN_DEBUG "... APIC ICR: %08x\n", icr);
> -	printk(KERN_DEBUG "... APIC ICR2: %08x\n", icr >> 32);
> +	printk(KERN_DEBUG "... APIC ICR: %08x\n", (unsigned int)icr);
> +	printk(KERN_DEBUG "... APIC ICR2: %08x\n", (unsigned int)(icr >> 32));

looks good, but I think casting to u32 is better, because u32 is used in io_apic_64.c.

thanks,
Hiroshi Shimamoto

      reply	other threads:[~2008-10-13 21:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-11 23:41 [PATCH] x86/io_apic_32: fix printk format warning Alexander Beregalov
2008-10-13 21:22 ` Hiroshi Shimamoto [this message]

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=48F3BC2E.5030601@ct.jp.nec.com \
    --to=h-shimamoto@ct.jp.nec.com \
    --cc=a.beregalov@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.