Skip to content
Snippets Groups Projects
Commit 1eebd14b authored by Thierry Reding's avatar Thierry Reding Committed by Tom Rini
Browse files

vsprintf: Add modifier for phys_addr_t


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: default avatarThierry Reding <treding@nvidia.com>
Tested-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 59e890ef
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment