Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1342184 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-02-24 17:40 +0100 |
| Last post | 2016-02-29 13:30 +0100 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] ASoC: trace: fix printing jack name Arnd Bergmann <arnd@arndb.de> - 2016-02-24 17:40 +0100
Re: [PATCH] ASoC: trace: fix printing jack name Steven Rostedt <rostedt@goodmis.org> - 2016-02-24 18:00 +0100
Re: [PATCH] ASoC: trace: fix printing jack name Takashi Iwai <tiwai@suse.de> - 2016-02-28 09:50 +0100
Re: [PATCH] ASoC: trace: fix printing jack name Mark Brown <broonie@kernel.org> - 2016-02-29 12:20 +0100
Re: [PATCH] ASoC: trace: fix printing jack name Takashi Iwai <tiwai@suse.de> - 2016-02-29 13:30 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-02-24 17:40 +0100 |
| Subject | [PATCH] ASoC: trace: fix printing jack name |
| Message-ID | <r5KDM-7ce-19@gated-at.bofh.it> |
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(-)
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index 317a1ed2f4ac..9130dd5a184a 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -231,13 +231,13 @@ TRACE_EVENT(snd_soc_jack_report,
TP_ARGS(jack, mask, val),
TP_STRUCT__entry(
- __string( name, jack->jack->name )
+ __string( name, jack->jack->id )
__field( int, mask )
__field( int, val )
),
TP_fast_assign(
- __assign_str(name, jack->jack->name);
+ __assign_str(name, jack->jack->id);
__entry->mask = mask;
__entry->val = val;
),
@@ -253,12 +253,12 @@ TRACE_EVENT(snd_soc_jack_notify,
TP_ARGS(jack, val),
TP_STRUCT__entry(
- __string( name, jack->jack->name )
+ __string( name, jack->jack->id )
__field( int, val )
),
TP_fast_assign(
- __assign_str(name, jack->jack->name);
+ __assign_str(name, jack->jack->id);
__entry->val = val;
),
--
2.7.0
[toc] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2016-02-24 18:00 +0100 |
| Message-ID | <r5KX9-7jg-27@gated-at.bofh.it> |
| In reply to | #1342184 |
On Wed, 24 Feb 2016 17:38:14 +0100
Arnd Bergmann <arnd@arndb.de> 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
>
> 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(-)
>
> diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
> index 317a1ed2f4ac..9130dd5a184a 100644
> --- a/include/trace/events/asoc.h
> +++ b/include/trace/events/asoc.h
> @@ -231,13 +231,13 @@ TRACE_EVENT(snd_soc_jack_report,
> TP_ARGS(jack, mask, val),
>
> TP_STRUCT__entry(
> - __string( name, jack->jack->name )
> + __string( name, jack->jack->id )
> __field( int, mask )
> __field( int, val )
> ),
>
> TP_fast_assign(
> - __assign_str(name, jack->jack->name);
> + __assign_str(name, jack->jack->id);
> __entry->mask = mask;
> __entry->val = val;
> ),
> @@ -253,12 +253,12 @@ TRACE_EVENT(snd_soc_jack_notify,
> TP_ARGS(jack, val),
>
> TP_STRUCT__entry(
> - __string( name, jack->jack->name )
> + __string( name, jack->jack->id )
> __field( int, val )
> ),
>
> TP_fast_assign(
> - __assign_str(name, jack->jack->name);
> + __assign_str(name, jack->jack->id);
> __entry->val = val;
> ),
>
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-02-28 09:50 +0100 |
| Message-ID | <r75d8-89y-5@gated-at.bofh.it> |
| In reply to | #1342215 |
On Wed, 24 Feb 2016 17:50:37 +0100,
Steven Rostedt wrote:
>
> On Wed, 24 Feb 2016 17:38:14 +0100
> Arnd Bergmann <arnd@arndb.de> 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.
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
>
>
> >
> > 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(-)
> >
> > diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
> > index 317a1ed2f4ac..9130dd5a184a 100644
> > --- a/include/trace/events/asoc.h
> > +++ b/include/trace/events/asoc.h
> > @@ -231,13 +231,13 @@ TRACE_EVENT(snd_soc_jack_report,
> > TP_ARGS(jack, mask, val),
> >
> > TP_STRUCT__entry(
> > - __string( name, jack->jack->name )
> > + __string( name, jack->jack->id )
> > __field( int, mask )
> > __field( int, val )
> > ),
> >
> > TP_fast_assign(
> > - __assign_str(name, jack->jack->name);
> > + __assign_str(name, jack->jack->id);
> > __entry->mask = mask;
> > __entry->val = val;
> > ),
> > @@ -253,12 +253,12 @@ TRACE_EVENT(snd_soc_jack_notify,
> > TP_ARGS(jack, val),
> >
> > TP_STRUCT__entry(
> > - __string( name, jack->jack->name )
> > + __string( name, jack->jack->id )
> > __field( int, val )
> > ),
> >
> > TP_fast_assign(
> > - __assign_str(name, jack->jack->name);
> > + __assign_str(name, jack->jack->id);
> > __entry->val = val;
> > ),
> >
>
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-02-29 12:20 +0100 |
| Message-ID | <r7u1R-2ia-27@gated-at.bofh.it> |
| In reply to | #1345186 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Feb 28, 2016 at 09:48:39AM +0100, Takashi Iwai wrote: > In anyway, the breakage came from my tree, so I'm going to apply the > fix directly on mine. I applied it to ASoC a few days ago.
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-02-29 13:30 +0100 |
| Message-ID | <r7v7B-2Wa-25@gated-at.bofh.it> |
| In reply to | #1345683 |
On Mon, 29 Feb 2016 12:13:59 +0100, Mark Brown wrote: > > On Sun, Feb 28, 2016 at 09:48:39AM +0100, Takashi Iwai wrote: > > > In anyway, the breakage came from my tree, so I'm going to apply the > > fix directly on mine. > > I applied it to ASoC a few days ago. Ah, OK, I didn't notice it. Thanks. Takashi
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web