[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130129025428.918e295c.akpm@linux-foundation.org>
Date: Tue, 29 Jan 2013 02:54:28 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Dave Hansen <dave@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] fix 32-bit compile warning from printk()
On Mon, 28 Jan 2013 11:19:39 -0800 Dave Hansen <dave@...ux.vnet.ibm.com> wrote:
> My patch "Fix kvm's use of __pa() on percpu areas" introduced a
> compile warning:
>
> arch/x86/kernel/kvm.c: In function 'kvm_register_steal_time':
> arch/x86/kernel/kvm.c:302:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat]
>
> According to: Documentation/printk-formats.txt
>
> If <type> is dependent on a config option for its size
> (e.g., phys_addr_t) ... use a format specifier of its
> largest possible type and explicitly cast to it.
>
> So, we'll do just that. We will consider it an unsigned long
> long, and cast to it explicitly.
Please note that I have
http://ozlabs.org/~akpm/mmots/broken-out/lib-vsprintf-add-%25pa-format-specifier-for-phys_addr_t-types.patch
queued for 3.8.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists