[alsa-devel] [PATCH][alsa-lib] topology: fix unused-const-variable warning
![](https://secure.gravatar.com/avatar/6ad2911cf7f4e6ac971062aeaaaf334d.jpg?s=120&d=mm&r=g)
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;
![](https://secure.gravatar.com/avatar/6ad2911cf7f4e6ac971062aeaaaf334d.jpg?s=120&d=mm&r=g)
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;
![](https://secure.gravatar.com/avatar/24e6a8158be3c9b52253d878d1487123.jpg?s=120&d=mm&r=g)
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;
![](https://secure.gravatar.com/avatar/8ae54e0aa5a525f2099e517de7683a51.jpg?s=120&d=mm&r=g)
-----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
![](https://secure.gravatar.com/avatar/6ad2911cf7f4e6ac971062aeaaaf334d.jpg?s=120&d=mm&r=g)
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.ht...
Thanks
Takashi Sakamoto
![](https://secure.gravatar.com/avatar/24e6a8158be3c9b52253d878d1487123.jpg?s=120&d=mm&r=g)
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.ht...
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
![](https://secure.gravatar.com/avatar/6ad2911cf7f4e6ac971062aeaaaf334d.jpg?s=120&d=mm&r=g)
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.ht...
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.ht...
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
![](https://secure.gravatar.com/avatar/8ae54e0aa5a525f2099e517de7683a51.jpg?s=120&d=mm&r=g)
-----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
![](https://secure.gravatar.com/avatar/5b19e9d0e834ea10ef75803718ad564b.jpg?s=120&d=mm&r=g)
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.ht...
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.ht...
I applied this one now. Thanks.
Takashi
participants (4)
-
Liam Girdwood
-
Lin, Mengdong
-
Takashi Iwai
-
Takashi Sakamoto