After a change to the snd_jack structure, the 'name' member
is no longer available in all configurations, which results in a
build failure in the tracing code:
include/trace/events/asoc.h: In function 'trace_event_raw_event_snd_soc_jack_report':
include/trace/events/asoc.h:240:32: error: 'struct snd_jack' has no member named 'name'
The name field is normally initialized from the card shortname and
the jack "id" field:
snprintf(jack->name, sizeof(jack->name), "%s %s",
card->shortname, jack->id);
This changes the tracing output to just contain the 'id' by
itself, which slightly changes the output format but avoids the
link error and is hopefully still enough to see what is going on.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fe0d128c57bf ("ALSA: jack: Allow building the jack layer without input device")
---
include/trace/events/asoc.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
From: Steven Rostedt <rostedt@goodmis.org> Date: 2016-02-24 16:50:43
On Wed, 24 Feb 2016 17:38:14 +0100
Arnd Bergmann [off-list ref] wrote:
After a change to the snd_jack structure, the 'name' member
is no longer available in all configurations, which results in a
build failure in the tracing code:
include/trace/events/asoc.h: In function 'trace_event_raw_event_snd_soc_jack_report':
include/trace/events/asoc.h:240:32: error: 'struct snd_jack' has no member named 'name'
The name field is normally initialized from the card shortname and
the jack "id" field:
snprintf(jack->name, sizeof(jack->name), "%s %s",
card->shortname, jack->id);
This changes the tracing output to just contain the 'id' by
itself, which slightly changes the output format but avoids the
link error and is hopefully still enough to see what is going on.
If people would like name if available, we could do:
#ifdef CONFIG_SND_JACK_INPUT_DEV
# define JACK_NAME(jk) (jk)->jack->name
#else
# define JACK_NAME(jk) (jk)->jack->id
#endif
And then below have:
__string( name, JACK_NAME(jack) )
The #ifdef can stay in the events/asoc.h file.
-- Steve
quoted hunk
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fe0d128c57bf ("ALSA: jack: Allow building the jack layer without input device")
---
include/trace/events/asoc.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
On Wed, 24 Feb 2016 17:50:37 +0100,
Steven Rostedt wrote:
On Wed, 24 Feb 2016 17:38:14 +0100
Arnd Bergmann [off-list ref] wrote:
quoted
After a change to the snd_jack structure, the 'name' member
is no longer available in all configurations, which results in a
build failure in the tracing code:
include/trace/events/asoc.h: In function 'trace_event_raw_event_snd_soc_jack_report':
include/trace/events/asoc.h:240:32: error: 'struct snd_jack' has no member named 'name'
The name field is normally initialized from the card shortname and
the jack "id" field:
snprintf(jack->name, sizeof(jack->name), "%s %s",
card->shortname, jack->id);
This changes the tracing output to just contain the 'id' by
itself, which slightly changes the output format but avoids the
link error and is hopefully still enough to see what is going on.
If people would like name if available, we could do:
#ifdef CONFIG_SND_JACK_INPUT_DEV
# define JACK_NAME(jk) (jk)->jack->name
#else
# define JACK_NAME(jk) (jk)->jack->id
#endif
And then below have:
__string( name, JACK_NAME(jack) )
The #ifdef can stay in the events/asoc.h file.
I don't mind either way. Mark, what do you think?
In anyway, the breakage came from my tree, so I'm going to apply the
fix directly on mine.
thanks,
Takashi
-- Steve
quoted
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fe0d128c57bf ("ALSA: jack: Allow building the jack layer without input device")
---
include/trace/events/asoc.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)