summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2022-11-25 19:23:26 +0300
committerTakashi Iwai <tiwai@suse.de>2022-11-28 16:55:41 +0300
commite4baf845364637bfe56228b282b8795a77d0f8af (patch)
tree6a6d0f9f9703783cc66c813c36ac555143aa5aae /sound
parent9d86515c3d4c0564a0c31a2df87d735353a1971e (diff)
downloadlinux-e4baf845364637bfe56228b282b8795a77d0f8af.tar.xz
ALSA: pcm: fix tracing reason in hw_ptr_error
Strings need to be specially marked in trace events to ensure the content is captured, othewise the trace just shows the value of the pointer. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20221125162327.297440-1-john@metanate.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_trace.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/pcm_trace.h b/sound/core/pcm_trace.h
index f18da2050772..350b40b906ca 100644
--- a/sound/core/pcm_trace.h
+++ b/sound/core/pcm_trace.h
@@ -88,19 +88,19 @@ TRACE_EVENT(hw_ptr_error,
__field( unsigned int, device )
__field( unsigned int, number )
__field( unsigned int, stream )
- __field( const char *, reason )
+ __string( reason, why )
),
TP_fast_assign(
__entry->card = (substream)->pcm->card->number;
__entry->device = (substream)->pcm->device;
__entry->number = (substream)->number;
__entry->stream = (substream)->stream;
- __entry->reason = (why);
+ __assign_str(reason, why);
),
TP_printk("pcmC%dD%d%s/sub%d: ERROR: %s",
__entry->card, __entry->device,
__entry->stream == SNDRV_PCM_STREAM_PLAYBACK ? "p" : "c",
- __entry->number, __entry->reason)
+ __entry->number, __get_str(reason))
);
TRACE_EVENT(applptr,