* [Qemu-devel] [PATCH] ps2-keyboard: Add val to trace_ps2_read_data
[not found] ` <cover.1462389348.git.wink@saville.com>
@ 2016-05-04 20:01 ` Wink Saville
0 siblings, 0 replies; 2+ messages in thread
From: Wink Saville @ 2016-05-04 20:01 UTC (permalink / raw)
To: qemu-devel; +Cc: dkoch
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 --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"
--
2.8.2
^ permalink raw reply related [flat|nested] 2+ messages in thread