ALSA: firewire-lib: use the same type of argument for CIP header for tracing event
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 19 May 2019 10:01:05 +0000 (19:01 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 21 May 2019 05:46:24 +0000 (07:46 +0200)
An argument for CIP header in 'in_packet' event is not the same type in
'out_packet' event. This is not good to unify these events.

This commit uses the same type of argument for these events.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-stream-trace.h
sound/firewire/amdtp-stream.c

index ac20acf48fc6912190df52dcecaa3fca801f5fc5..a86a827eab909cb2d59613c725a486cc836bd94c 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/tracepoint.h>
 
 TRACE_EVENT(in_packet,
-       TP_PROTO(const struct amdtp_stream *s, u32 cycles, u32 *cip_header, unsigned int payload_length, unsigned int index),
+       TP_PROTO(const struct amdtp_stream *s, u32 cycles, const __be32 *cip_header, unsigned int payload_length, unsigned int index),
        TP_ARGS(s, cycles, cip_header, payload_length, index),
        TP_STRUCT__entry(
                __field(unsigned int, second)
@@ -35,8 +35,8 @@ TRACE_EVENT(in_packet,
                __entry->channel = s->context->channel;
                __entry->src = fw_parent_device(s->unit)->node_id;
                __entry->dest = fw_parent_device(s->unit)->card->node_id;
-               __entry->cip_header0 = cip_header[0];
-               __entry->cip_header1 = cip_header[1];
+               __entry->cip_header0 = be32_to_cpu(cip_header[0]);
+               __entry->cip_header1 = be32_to_cpu(cip_header[1]);
                __entry->payload_quadlets = payload_length / 4;
                __entry->packet_index = s->packet_index;
                __entry->irq = !!in_interrupt();
index 43f28b813386e7b9f90273fb82da0b4b6ad012d0..2614fa551e2413bc804f1a096d5737e57037f82f 100644 (file)
@@ -555,7 +555,7 @@ static int handle_in_packet(struct amdtp_stream *s,
        cip_header[0] = be32_to_cpu(buffer[0]);
        cip_header[1] = be32_to_cpu(buffer[1]);
 
-       trace_in_packet(s, cycle, cip_header, payload_length, index);
+       trace_in_packet(s, cycle, buffer, payload_length, index);
 
        /*
         * This module supports 'Two-quadlet CIP header with SYT field'.