diff mbox

[v2] hw/a9mpcore: Fix compilation failure if physaddrs are 64 bit

Message ID 1337707197-3822-1-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell May 22, 2012, 5:19 p.m. UTC
Add a cast to a logging printf to avoid a compilation failure
if target_phys_addr_t is a 64 bit type. (This is better than
using TARGET_FMT_plx because we really don't need a full
16 digit hex string to print the offset into a device.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
v1->v2: cast to unsigned int, not uint32_t.

 hw/a9mpcore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Eric Blake May 22, 2012, 5:21 p.m. UTC | #1
On 05/22/2012 11:19 AM, Peter Maydell wrote:
> Add a cast to a logging printf to avoid a compilation failure
> if target_phys_addr_t is a 64 bit type. (This is better than
> using TARGET_FMT_plx because we really don't need a full
> 16 digit hex string to print the offset into a device.)
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> v1->v2: cast to unsigned int, not uint32_t.
> 
>  hw/a9mpcore.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c
> index c2ff74d..ebd5b29 100644
> --- a/hw/a9mpcore.c
> +++ b/hw/a9mpcore.c
> @@ -75,7 +75,7 @@ static void a9_scu_write(void *opaque, target_phys_addr_t offset,
>          break;
>      default:
>          fprintf(stderr, "Invalid size %u in write to a9 scu register %x\n",
> -                size, offset);
> +                size, (unsigned)offset);

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c
index c2ff74d..ebd5b29 100644
--- a/hw/a9mpcore.c
+++ b/hw/a9mpcore.c
@@ -75,7 +75,7 @@  static void a9_scu_write(void *opaque, target_phys_addr_t offset,
         break;
     default:
         fprintf(stderr, "Invalid size %u in write to a9 scu register %x\n",
-                size, offset);
+                size, (unsigned)offset);
         return;
     }