Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751823AbbEGVYt (ORCPT ); Thu, 7 May 2015 17:24:49 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:36172 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbbEGVYr convert rfc822-to-8bit (ORCPT ); Thu, 7 May 2015 17:24:47 -0400 MIME-Version: 1.0 In-Reply-To: <20150506163016.a2d79f89abc7543cb80307ac@linux-foundation.org> References: <20150506163016.a2d79f89abc7543cb80307ac@linux-foundation.org> Date: Thu, 7 May 2015 14:24:46 -0700 Message-ID: Subject: Re: [PATCH 2/3] mm/memblock: Allocate boot time data structures from mirrored memory From: Tony Luck To: Andrew Morton Cc: Linux Kernel Mailing List , "linux-mm@kvack.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1180 Lines: 33 On Wed, May 6, 2015 at 4:30 PM, Andrew Morton 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", says: #ifdef CONFIG_PHYS_ADDR_T_64BIT typedef u64 phys_addr_t; #else typedef u32 phys_addr_t; #endif So my original %lld would indeed have barfed on 32-bit builds ... but %pap doesn't seem to be the right answer either. -Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/