diff mbox

ps2-keyboard: Add val to trace_ps2_read_data

Message ID 04cf1dc7e693c1e7d6d157cdb015009ca3c07193.1462389348.git.wink@saville.com
State New
Headers show

Commit Message

Wink Saville May 4, 2016, 8:01 p.m. UTC
To make the trace output more useful print the value
returned by ps2_read_data.

Signed-off-by: Wink Saville <wink@saville.com>
---
 hw/input/ps2.c | 2 +-
 trace-events   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index a8aa36f..e27d8e4 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -199,7 +199,6 @@  uint32_t ps2_read_data(void *opaque)
     PS2Queue *q;
     int val, index;
 
-    trace_ps2_read_data(opaque);
     q = &s->queue;
     if (q->count == 0) {
         /* NOTE: if no data left, we return the last keyboard one
@@ -219,6 +218,7 @@  uint32_t ps2_read_data(void *opaque)
         /* reassert IRQs if data left */
         s->update_irq(s->update_arg, q->count != 0);
     }
+    trace_ps2_read_data(opaque, val);
     return val;
 }
 
diff --git a/trace-events b/trace-events
index 8350743..4a5d056 100644
--- a/trace-events
+++ b/trace-events
@@ -229,7 +229,7 @@  slavio_set_timer_irq_cpu(int cpu, int level) "Set cpu %d local timer level %d"
 
 # hw/input/ps2.c
 ps2_put_keycode(void *opaque, int keycode) "%p keycode %d"
-ps2_read_data(void *opaque) "%p"
+ps2_read_data(void *opaque, int val) "%p val %d"
 ps2_set_ledstate(void *s, int ledstate) "%p ledstate %d"
 ps2_reset_keyboard(void *s) "%p"
 ps2_write_keyboard(void *opaque, int val) "%p val %d"