lkml.org 
[lkml]   [2015]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] mm/memblock: Allocate boot time data structures from mirrored memory
On Thu, 7 May 2015 14:24:46 -0700 Tony Luck <tony.luck@gmail.com> wrote:

> On Wed, May 6, 2015 at 4:30 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
> >> + if (!ret && flag) {
> >> + pr_warn("Could not allocate %lld bytes of mirrored memory\n", size);
> >
> > This printk will warn on some configs. Print a phys_addr_t with %pap.
> > I think. See huge comment over lib/vsprintf.c:pointer().
>
> The comment may be huge - but it seems to lie about phys_addr_t :-(
>
> I changed to %pap and got:
>
> mm/memblock.c: In function 'memblock_find_in_range':
> mm/memblock.c:276:3: warning: format '%p' expects argument of type
> 'void *', but argument 2 has type 'phys_addr_t' [-Wformat=]
> pr_warn("Could not allocate %pap bytes of mirrored memory\n",

Use "&size" rather than "size". All the %p extensions require a
pointer to the thing-to-be-printed.



\
 
 \ /
  Last update: 2015-05-07 23:41    [W:0.490 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site