Patchwork [9/9] xilinx_timer: Fix a compile error if debug messages are enabled.

login
register
mail settings
Submitter crwulff@gmail.com
Date Sept. 10, 2012, 12:20 a.m.
Message ID <1347236407-10465-10-git-send-email-crwulff@gmail.com>
Download mbox | patch
Permalink /patch/182761/
State New
Headers show

Comments

crwulff@gmail.com - Sept. 10, 2012, 12:20 a.m.
From: Chris Wulff <crwulff@gmail.com>

Signed-off-by: Chris Wulff <crwulff@gmail.com>
---
 hw/xilinx_timer.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Peter A. G. Crosthwaite - Sept. 12, 2012, 12:25 a.m.
Queued to microblaze-devs.

Thanks,
Peter

On Mon, Sep 10, 2012 at 10:20 AM,  <crwulff@gmail.com> wrote:
> From: Chris Wulff <crwulff@gmail.com>
>
> Signed-off-by: Chris Wulff <crwulff@gmail.com>-by: Chris Wulff <crwulff@gmail.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>

> ---
>  hw/xilinx_timer.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
> index b562bd0..18f354b 100644
> --- a/hw/xilinx_timer.c
> +++ b/hw/xilinx_timer.c
> @@ -24,6 +24,7 @@
>
>  #include "sysbus.h"
>  #include "ptimer.h"
> +#include "qemu-log.h"
>
>  #define D(x)
>
> @@ -189,7 +190,7 @@ static void timer_hit(void *opaque)
>  {
>      struct xlx_timer *xt = opaque;
>      struct timerblock *t = xt->parent;
> -    D(printf("%s %d\n", __func__, timer));
> +    D(printf("%s %d\n", __func__, xt->nr));
>      xt->regs[R_TCSR] |= TCSR_TINT;
>
>      if (xt->regs[R_TCSR] & TCSR_ARHT)
> --
> 1.7.9.5
>
>

Patch

diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
index b562bd0..18f354b 100644
--- a/hw/xilinx_timer.c
+++ b/hw/xilinx_timer.c
@@ -24,6 +24,7 @@ 
 
 #include "sysbus.h"
 #include "ptimer.h"
+#include "qemu-log.h"
 
 #define D(x)
 
@@ -189,7 +190,7 @@  static void timer_hit(void *opaque)
 {
     struct xlx_timer *xt = opaque;
     struct timerblock *t = xt->parent;
-    D(printf("%s %d\n", __func__, timer));
+    D(printf("%s %d\n", __func__, xt->nr));
     xt->regs[R_TCSR] |= TCSR_TINT;
 
     if (xt->regs[R_TCSR] & TCSR_ARHT)