From: Tom Rini Date: Mon, 24 Nov 2014 17:11:19 -0500 Subject: [U-Boot] [U-Boot, v3, 01/30] vsprintf: Add modifier for phys_addr_t In-Reply-To: <1415842036-28471-2-git-send-email-sjg@chromium.org> References: <1415842036-28471-2-git-send-email-sjg@chromium.org> Message-ID: <20141124221119.GV21184@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Nov 12, 2014 at 06:26:47PM -0700, Simon Glass wrote: > From: Thierry Reding > > Provide a new modifier to vsprintf() to print phys_addr_t variables to > avoid having to cast or #ifdef when printing them out. The %pa modifier > is used for this purpose, so phys_addr_t variables need to be passed by > reference, like so: > > phys_addr_t start = 0; > > printf("start: %pa\n", &start); > > Depending on the size of phys_addr_t this will print out the address > with 8 or 16 hexadecimal digits following a 0x prefix. > > Signed-off-by: Thierry Reding > Tested-by: Stephen Warren > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: