* [PATCH][alsa-lib] topology: fix unused-const-variable warning
@ 2016-11-29 15:44 Takashi Sakamoto
2016-12-17 0:39 ` Takashi Sakamoto
0 siblings, 1 reply; 9+ messages in thread
From: Takashi Sakamoto @ 2016-11-29 15:44 UTC (permalink / raw)
To: tiwai, perex; +Cc: liam.r.girdwood, alsa-devel
Last year, unused static const variable was added, then compiler generates
a below warning.
dapm.c:43:30: warning: ‘widget_control_map’ defined but not used [-Wunused-const-variable=]
static const struct map_elem widget_control_map[] = {
^~~~~~~~~~~~~~~~~~
This commit removes it.
Fixes: 01a0e1a1c219 ("topology: Add DAPM object parser")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
src/topology/dapm.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/topology/dapm.c b/src/topology/dapm.c
index e830751..8c585a7 100644
--- a/src/topology/dapm.c
+++ b/src/topology/dapm.c
@@ -39,14 +39,6 @@ static const struct map_elem widget_map[] = {
{"dai_link", SND_SOC_TPLG_DAPM_DAI_LINK},
};
-/* mapping of widget kcontrol text names to types */
-static const struct map_elem widget_control_map[] = {
- {"volsw", SND_SOC_TPLG_DAPM_CTL_VOLSW},
- {"enum_double", SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE},
- {"enum_virt", SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT},
- {"enum_value", SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE},
-};
-
static int lookup_widget(const char *w)
{
unsigned int i;
--
2.9.3
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH][alsa-lib] topology: fix unused-const-variable warning
2016-11-29 15:44 [PATCH][alsa-lib] topology: fix unused-const-variable warning Takashi Sakamoto
@ 2016-12-17 0:39 ` Takashi Sakamoto
2016-12-23 8:49 ` Liam Girdwood
0 siblings, 1 reply; 9+ messages in thread
From: Takashi Sakamoto @ 2016-12-17 0:39 UTC (permalink / raw)
To: tiwai, perex; +Cc: liam.r.girdwood, alsa-devel
Ping to Liam. I wish this patch would be included to next release of
this library.
On 2016年11月30日 00:44, Takashi Sakamoto wrote:
> Last year, unused static const variable was added, then compiler generates
> a below warning.
>
> dapm.c:43:30: warning: ‘widget_control_map’ defined but not used [-Wunused-const-variable=]
> static const struct map_elem widget_control_map[] = {
> ^~~~~~~~~~~~~~~~~~
>
> This commit removes it.
>
> Fixes: 01a0e1a1c219 ("topology: Add DAPM object parser")
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
> src/topology/dapm.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/src/topology/dapm.c b/src/topology/dapm.c
> index e830751..8c585a7 100644
> --- a/src/topology/dapm.c
> +++ b/src/topology/dapm.c
> @@ -39,14 +39,6 @@ static const struct map_elem widget_map[] = {
> {"dai_link", SND_SOC_TPLG_DAPM_DAI_LINK},
> };
>
> -/* mapping of widget kcontrol text names to types */
> -static const struct map_elem widget_control_map[] = {
> - {"volsw", SND_SOC_TPLG_DAPM_CTL_VOLSW},
> - {"enum_double", SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE},
> - {"enum_virt", SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT},
> - {"enum_value", SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE},
> -};
> -
> static int lookup_widget(const char *w)
> {
> unsigned int i;
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][alsa-lib] topology: fix unused-const-variable warning
2016-12-17 0:39 ` Takashi Sakamoto
@ 2016-12-23 8:49 ` Liam Girdwood
2016-12-23 14:48 ` Lin, Mengdong
0 siblings, 1 reply; 9+ messages in thread
From: Liam Girdwood @ 2016-12-23 8:49 UTC (permalink / raw)
To: Takashi Sakamoto, mengdong.lin; +Cc: tiwai, alsa-devel
This looks fine by me, Mengdong is this still unused or is it needed by
a future patch ?
On Sat, 2016-12-17 at 09:39 +0900, Takashi Sakamoto wrote:
> Ping to Liam. I wish this patch would be included to next release of
> this library.
>
> On 2016年11月30日 00:44, Takashi Sakamoto wrote:
> > Last year, unused static const variable was added, then compiler generates
> > a below warning.
> >
> > dapm.c:43:30: warning: ‘widget_control_map’ defined but not used [-Wunused-const-variable=]
> > static const struct map_elem widget_control_map[] = {
> > ^~~~~~~~~~~~~~~~~~
> >
> > This commit removes it.
> >
> > Fixes: 01a0e1a1c219 ("topology: Add DAPM object parser")
> > Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> > ---
> > src/topology/dapm.c | 8 --------
> > 1 file changed, 8 deletions(-)
> >
> > diff --git a/src/topology/dapm.c b/src/topology/dapm.c
> > index e830751..8c585a7 100644
> > --- a/src/topology/dapm.c
> > +++ b/src/topology/dapm.c
> > @@ -39,14 +39,6 @@ static const struct map_elem widget_map[] = {
> > {"dai_link", SND_SOC_TPLG_DAPM_DAI_LINK},
> > };
> >
> > -/* mapping of widget kcontrol text names to types */
> > -static const struct map_elem widget_control_map[] = {
> > - {"volsw", SND_SOC_TPLG_DAPM_CTL_VOLSW},
> > - {"enum_double", SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE},
> > - {"enum_virt", SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT},
> > - {"enum_value", SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE},
> > -};
> > -
> > static int lookup_widget(const char *w)
> > {
> > unsigned int i;
> >
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][alsa-lib] topology: fix unused-const-variable warning
2016-12-23 8:49 ` Liam Girdwood
@ 2016-12-23 14:48 ` Lin, Mengdong
2016-12-23 15:08 ` Takashi Sakamoto
0 siblings, 1 reply; 9+ messages in thread
From: Lin, Mengdong @ 2016-12-23 14:48 UTC (permalink / raw)
To: Liam Girdwood, Takashi Sakamoto, mengdong.lin; +Cc: tiwai, alsa-devel
> -----Original Message-----
> From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-
> bounces@alsa-project.org] On Behalf Of Liam Girdwood
> Sent: Friday, December 23, 2016 4:49 PM
>
> This looks fine by me, Mengdong is this still unused or is it needed by a
> future patch ?
Hi Liam,
This "widget_control_map" is still unused now.
Could you remember why we define this map in the early phase?
I guess previously we want to distinguish stand-alone controls from controls embedded in widgets. But now we process them in the same way, both in user space and kernel.
So I feel we can remove this structure.
Thanks
Mengdong
>
> On Sat, 2016-12-17 at 09:39 +0900, Takashi Sakamoto wrote:
> > Ping to Liam. I wish this patch would be included to next release of
> > this library.
> >
> > On 2016年11月30日 00:44, Takashi Sakamoto wrote:
> > > Last year, unused static const variable was added, then compiler
> > > generates a below warning.
> > >
> > > dapm.c:43:30: warning: ‘widget_control_map’ defined but not used
> > > [-Wunused-const-variable=] static const struct map_elem
> widget_control_map[] = {
> > > ^~~~~~~~~~~~~~~~~~
> > >
> > > This commit removes it.
> > >
> > > Fixes: 01a0e1a1c219 ("topology: Add DAPM object parser")
> > > Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> > > ---
> > > src/topology/dapm.c | 8 --------
> > > 1 file changed, 8 deletions(-)
> > >
> > > diff --git a/src/topology/dapm.c b/src/topology/dapm.c index
> > > e830751..8c585a7 100644
> > > --- a/src/topology/dapm.c
> > > +++ b/src/topology/dapm.c
> > > @@ -39,14 +39,6 @@ static const struct map_elem widget_map[] = {
> > > {"dai_link", SND_SOC_TPLG_DAPM_DAI_LINK}, };
> > >
> > > -/* mapping of widget kcontrol text names to types */ -static const
> > > struct map_elem widget_control_map[] = {
> > > - {"volsw", SND_SOC_TPLG_DAPM_CTL_VOLSW},
> > > - {"enum_double", SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE},
> > > - {"enum_virt", SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT},
> > > - {"enum_value", SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE},
> > > -};
> > > -
> > > static int lookup_widget(const char *w) {
> > > unsigned int i;
> > >
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][alsa-lib] topology: fix unused-const-variable warning
2016-12-23 14:48 ` Lin, Mengdong
@ 2016-12-23 15:08 ` Takashi Sakamoto
2016-12-23 15:23 ` Liam Girdwood
0 siblings, 1 reply; 9+ messages in thread
From: Takashi Sakamoto @ 2016-12-23 15:08 UTC (permalink / raw)
To: Lin, Mengdong, Liam Girdwood, mengdong.lin; +Cc: tiwai, alsa-devel
On 2016年12月23日 23:48, Lin, Mengdong wrote:
>> -----Original Message-----
>> From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-
>> bounces@alsa-project.org] On Behalf Of Liam Girdwood
>> Sent: Friday, December 23, 2016 4:49 PM
>>
>> This looks fine by me, Mengdong is this still unused or is it needed by a
>> future patch ?
>
> Hi Liam,
>
> This "widget_control_map" is still unused now.
>
> Could you remember why we define this map in the early phase?
> I guess previously we want to distinguish stand-alone controls from controls embedded in widgets. But now we process them in the same way, both in user space and kernel.
>
> So I feel we can remove this structure.
Additionally, would you check this post to fix some warnings which you
added into alsa-lib, please.
[alsa-devel] [PATCH][alsa-lib] topology: fix sign-compare warning
introduced to set_link_hw_config() and tplg_add_link_object()
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-December/115896.html
Thanks
Takashi Sakamoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][alsa-lib] topology: fix unused-const-variable warning
2016-12-23 15:08 ` Takashi Sakamoto
@ 2016-12-23 15:23 ` Liam Girdwood
2016-12-23 15:34 ` Takashi Sakamoto
0 siblings, 1 reply; 9+ messages in thread
From: Liam Girdwood @ 2016-12-23 15:23 UTC (permalink / raw)
To: Takashi Sakamoto; +Cc: tiwai, Lin, Mengdong, alsa-devel, mengdong.lin
On Sat, 2016-12-24 at 00:08 +0900, Takashi Sakamoto wrote:
> On 2016年12月23日 23:48, Lin, Mengdong wrote:
> >> -----Original Message-----
> >> From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-
> >> bounces@alsa-project.org] On Behalf Of Liam Girdwood
> >> Sent: Friday, December 23, 2016 4:49 PM
> >>
> >> This looks fine by me, Mengdong is this still unused or is it needed by a
> >> future patch ?
> >
> > Hi Liam,
> >
> > This "widget_control_map" is still unused now.
> >
> > Could you remember why we define this map in the early phase?
> > I guess previously we want to distinguish stand-alone controls from controls embedded in widgets. But now we process them in the same way, both in user space and kernel.
> >
> > So I feel we can remove this structure.
>
> Additionally, would you check this post to fix some warnings which you
> added into alsa-lib, please.
> [alsa-devel] [PATCH][alsa-lib] topology: fix sign-compare warning
> introduced to set_link_hw_config() and tplg_add_link_object()
> http://mailman.alsa-project.org/pipermail/alsa-devel/2016-December/115896.html
>
>
Both look good to me. Apologies that I missed them.
You may want to resend them both with my Ack (maybe wait for until after
Christmas though).
Thanks
Liam
> Thanks
>
> Takashi Sakamoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][alsa-lib] topology: fix unused-const-variable warning
2016-12-23 15:23 ` Liam Girdwood
@ 2016-12-23 15:34 ` Takashi Sakamoto
2016-12-27 9:57 ` Lin, Mengdong
2017-01-02 14:22 ` Takashi Iwai
0 siblings, 2 replies; 9+ messages in thread
From: Takashi Sakamoto @ 2016-12-23 15:34 UTC (permalink / raw)
To: Liam Girdwood; +Cc: tiwai, Lin, Mengdong, alsa-devel, mengdong.lin
On 2016年12月24日 00:23, Liam Girdwood wrote:
> On Sat, 2016-12-24 at 00:08 +0900, Takashi Sakamoto wrote:
>> On 2016年12月23日 23:48, Lin, Mengdong wrote:
>>>> -----Original Message-----
>>>> From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-
>>>> bounces@alsa-project.org] On Behalf Of Liam Girdwood
>>>> Sent: Friday, December 23, 2016 4:49 PM
>>>>
>>>> This looks fine by me, Mengdong is this still unused or is it needed by a
>>>> future patch ?
>>>
>>> Hi Liam,
>>>
>>> This "widget_control_map" is still unused now.
>>>
>>> Could you remember why we define this map in the early phase?
>>> I guess previously we want to distinguish stand-alone controls from controls embedded in widgets. But now we process them in the same way, both in user space and kernel.
>>>
>>> So I feel we can remove this structure.
>>
>> Additionally, would you check this post to fix some warnings which you
>> added into alsa-lib, please.
>> [alsa-devel] [PATCH][alsa-lib] topology: fix sign-compare warning
>> introduced to set_link_hw_config() and tplg_add_link_object()
>> http://mailman.alsa-project.org/pipermail/alsa-devel/2016-December/115896.html
>>
>>
>
> Both look good to me. Apologies that I missed them.
>
> You may want to resend them both with my Ack (maybe wait for until after
> Christmas though).
No need. Iwai-san already reviewed them. Next year, I'll request him to
apply them.
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-December/115725.html
I request Mengdong-Lin to care of compiler warnings again. Her patches
frequently bring this kind of mistakes, and I have no motivations to fix
them anymore.
Thanks
Takashi Sakamoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][alsa-lib] topology: fix unused-const-variable warning
2016-12-23 15:34 ` Takashi Sakamoto
@ 2016-12-27 9:57 ` Lin, Mengdong
2017-01-02 14:22 ` Takashi Iwai
1 sibling, 0 replies; 9+ messages in thread
From: Lin, Mengdong @ 2016-12-27 9:57 UTC (permalink / raw)
To: Takashi Sakamoto, Liam Girdwood; +Cc: tiwai, alsa-devel, mengdong.lin
> -----Original Message-----
> From: Takashi Sakamoto [mailto:o-takashi@sakamocchi.jp]
> Sent: Friday, December 23, 2016 11:34 PM
> >>>
> >>> Hi Liam,
> >>>
> >>> This "widget_control_map" is still unused now.
> >>>
> >>> Could you remember why we define this map in the early phase?
> >>> I guess previously we want to distinguish stand-alone controls from
> controls embedded in widgets. But now we process them in the same way,
> both in user space and kernel.
> >>>
> >>> So I feel we can remove this structure.
> >>
> >> Additionally, would you check this post to fix some warnings which
> >> you added into alsa-lib, please.
> >> [alsa-devel] [PATCH][alsa-lib] topology: fix sign-compare warning
> >> introduced to set_link_hw_config() and tplg_add_link_object()
> >> http://mailman.alsa-project.org/pipermail/alsa-devel/2016-December/11
> >> 5896.html
> >>
> >>
> >
> > Both look good to me. Apologies that I missed them.
> >
> > You may want to resend them both with my Ack (maybe wait for until
> > after Christmas though).
>
> No need. Iwai-san already reviewed them. Next year, I'll request him to apply
> them.
> http://mailman.alsa-project.org/pipermail/alsa-devel/2016-
> December/115725.html
>
> I request Mengdong-Lin to care of compiler warnings again. Her patches
> frequently bring this kind of mistakes, and I have no motivations to fix them
> anymore.
Sorry for this. I'll be careful on the warnings.
To avoid the same issue for UCM, I submitted patches to add '-Wall' to the AM_CPPFLAGS for topology, so we can always see the warnings and fix them.
If this is acceptable for ucm, I'll also enable all warnings for topology as well.
Thanks
Mengdong
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][alsa-lib] topology: fix unused-const-variable warning
2016-12-23 15:34 ` Takashi Sakamoto
2016-12-27 9:57 ` Lin, Mengdong
@ 2017-01-02 14:22 ` Takashi Iwai
1 sibling, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2017-01-02 14:22 UTC (permalink / raw)
To: Takashi Sakamoto; +Cc: Liam Girdwood, Lin, Mengdong, alsa-devel, mengdong.lin
On Fri, 23 Dec 2016 16:34:29 +0100,
Takashi Sakamoto wrote:
>
> On 2016年12月24日 00:23, Liam Girdwood wrote:
> > On Sat, 2016-12-24 at 00:08 +0900, Takashi Sakamoto wrote:
> >> On 2016年12月23日 23:48, Lin, Mengdong wrote:
> >>>> -----Original Message-----
> >>>> From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-
> >>>> bounces@alsa-project.org] On Behalf Of Liam Girdwood
> >>>> Sent: Friday, December 23, 2016 4:49 PM
> >>>>
> >>>> This looks fine by me, Mengdong is this still unused or is it needed by a
> >>>> future patch ?
> >>>
> >>> Hi Liam,
> >>>
> >>> This "widget_control_map" is still unused now.
> >>>
> >>> Could you remember why we define this map in the early phase?
> >>> I guess previously we want to distinguish stand-alone controls from controls embedded in widgets. But now we process them in the same way, both in user space and kernel.
> >>>
> >>> So I feel we can remove this structure.
> >>
> >> Additionally, would you check this post to fix some warnings which you
> >> added into alsa-lib, please.
> >> [alsa-devel] [PATCH][alsa-lib] topology: fix sign-compare warning
> >> introduced to set_link_hw_config() and tplg_add_link_object()
> >> http://mailman.alsa-project.org/pipermail/alsa-devel/2016-December/115896.html
> >>
> >>
> >
> > Both look good to me. Apologies that I missed them.
> >
> > You may want to resend them both with my Ack (maybe wait for until after
> > Christmas though).
>
> No need. Iwai-san already reviewed them. Next year, I'll request him
> to apply them.
> http://mailman.alsa-project.org/pipermail/alsa-devel/2016-December/115725.html
I applied this one now. Thanks.
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-01-02 14:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-29 15:44 [PATCH][alsa-lib] topology: fix unused-const-variable warning Takashi Sakamoto
2016-12-17 0:39 ` Takashi Sakamoto
2016-12-23 8:49 ` Liam Girdwood
2016-12-23 14:48 ` Lin, Mengdong
2016-12-23 15:08 ` Takashi Sakamoto
2016-12-23 15:23 ` Liam Girdwood
2016-12-23 15:34 ` Takashi Sakamoto
2016-12-27 9:57 ` Lin, Mengdong
2017-01-02 14:22 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.