linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()
@ 2017-05-23 19:05 Matthias Kaehlcke
  2017-05-23 19:25 ` [alsa-devel] " Pierre-Louis Bossart
  2017-05-24 17:42 ` Applied "ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()" to the asoc tree Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Matthias Kaehlcke @ 2017-05-23 19:05 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, Yang A Fang
  Cc: alsa-devel, linux-kernel, Douglas Anderson, Matthias Kaehlcke

Looks like the function has never been used since it was added by commit
17119a465706 ("ASoC: Intel: Add Cherrytrail & Braswell machine driver
cht_bsw_max98090_ti"). Removing it fixes the following warning when
building with clang:

sound/soc/intel/boards/cht_bsw_max98090_ti.c:42:35: error: unused
    function 'cht_get_codec_dai' [-Werror,-Wunused-function]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index 742bc0d4e681..20755ecc7f9e 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -39,18 +39,6 @@ struct cht_mc_private {
 	bool ts3a227e_present;
 };
 
-static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
-{
-	struct snd_soc_pcm_runtime *rtd;
-
-	list_for_each_entry(rtd, &card->rtd_list, list) {
-		if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI,
-			     strlen(CHT_CODEC_DAI)))
-			return rtd->codec_dai;
-	}
-	return NULL;
-}
-
 static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
 	SND_SOC_DAPM_HP("Headphone", NULL),
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
-- 
2.13.0.219.gdb65acc882-goog

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()
  2017-05-23 19:05 [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai() Matthias Kaehlcke
@ 2017-05-23 19:25 ` Pierre-Louis Bossart
  2017-05-23 19:32   ` Matthias Kaehlcke
  2017-05-24 17:42 ` Applied "ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()" to the asoc tree Mark Brown
  1 sibling, 1 reply; 5+ messages in thread
From: Pierre-Louis Bossart @ 2017-05-23 19:25 UTC (permalink / raw)
  To: Matthias Kaehlcke, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Yang A Fang
  Cc: alsa-devel, linux-kernel, Douglas Anderson

On 5/23/17 12:05 PM, Matthias Kaehlcke wrote:
> Looks like the function has never been used since it was added by commit
> 17119a465706 ("ASoC: Intel: Add Cherrytrail & Braswell machine driver
> cht_bsw_max98090_ti"). Removing it fixes the following warning when
> building with clang:
>
> sound/soc/intel/boards/cht_bsw_max98090_ti.c:42:35: error: unused
>     function 'cht_get_codec_dai' [-Werror,-Wunused-function]

Fine but it'll have to be re-added when I finally find the time to 
support Baytrail with this driver.

>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>  sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> index 742bc0d4e681..20755ecc7f9e 100644
> --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> @@ -39,18 +39,6 @@ struct cht_mc_private {
>  	bool ts3a227e_present;
>  };
>
> -static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
> -{
> -	struct snd_soc_pcm_runtime *rtd;
> -
> -	list_for_each_entry(rtd, &card->rtd_list, list) {
> -		if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI,
> -			     strlen(CHT_CODEC_DAI)))
> -			return rtd->codec_dai;
> -	}
> -	return NULL;
> -}
> -
>  static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
>  	SND_SOC_DAPM_HP("Headphone", NULL),
>  	SND_SOC_DAPM_MIC("Headset Mic", NULL),
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()
  2017-05-23 19:25 ` [alsa-devel] " Pierre-Louis Bossart
@ 2017-05-23 19:32   ` Matthias Kaehlcke
  2017-05-23 19:49     ` Pierre-Louis Bossart
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Kaehlcke @ 2017-05-23 19:32 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Yang A Fang, alsa-devel, linux-kernel, Douglas Anderson

Hi Pierre-Louis,

El Tue, May 23, 2017 at 12:25:17PM -0700 Pierre-Louis Bossart ha dit:

> On 5/23/17 12:05 PM, Matthias Kaehlcke wrote:
> >Looks like the function has never been used since it was added by commit
> >17119a465706 ("ASoC: Intel: Add Cherrytrail & Braswell machine driver
> >cht_bsw_max98090_ti"). Removing it fixes the following warning when
> >building with clang:
> >
> >sound/soc/intel/boards/cht_bsw_max98090_ti.c:42:35: error: unused
> >    function 'cht_get_codec_dai' [-Werror,-Wunused-function]
> 
> Fine but it'll have to be re-added when I finally find the time to
> support Baytrail with this driver.

If you have plans to add the code in a nearish future it is probably
not worth to do the removal, unless the maintainers think otherwise.

> >Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> >---
> > sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 ------------
> > 1 file changed, 12 deletions(-)
> >
> >diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> >index 742bc0d4e681..20755ecc7f9e 100644
> >--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> >+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
> >@@ -39,18 +39,6 @@ struct cht_mc_private {
> > 	bool ts3a227e_present;
> > };
> >
> >-static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
> >-{
> >-	struct snd_soc_pcm_runtime *rtd;
> >-
> >-	list_for_each_entry(rtd, &card->rtd_list, list) {
> >-		if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI,
> >-			     strlen(CHT_CODEC_DAI)))
> >-			return rtd->codec_dai;
> >-	}
> >-	return NULL;
> >-}
> >-
> > static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
> > 	SND_SOC_DAPM_HP("Headphone", NULL),
> > 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
> >
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()
  2017-05-23 19:32   ` Matthias Kaehlcke
@ 2017-05-23 19:49     ` Pierre-Louis Bossart
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2017-05-23 19:49 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Yang A Fang, alsa-devel, linux-kernel, Douglas Anderson

On 5/23/17 12:32 PM, Matthias Kaehlcke wrote:
> Hi Pierre-Louis,
>
> El Tue, May 23, 2017 at 12:25:17PM -0700 Pierre-Louis Bossart ha dit:
>
>> On 5/23/17 12:05 PM, Matthias Kaehlcke wrote:
>>> Looks like the function has never been used since it was added by commit
>>> 17119a465706 ("ASoC: Intel: Add Cherrytrail & Braswell machine driver
>>> cht_bsw_max98090_ti"). Removing it fixes the following warning when
>>> building with clang:
>>>
>>> sound/soc/intel/boards/cht_bsw_max98090_ti.c:42:35: error: unused
>>>    function 'cht_get_codec_dai' [-Werror,-Wunused-function]
>>
>> Fine but it'll have to be re-added when I finally find the time to
>> support Baytrail with this driver.
>
> If you have plans to add the code in a nearish future it is probably
> not worth to do the removal, unless the maintainers think otherwise.

I have patches for this on github, but I've been unable to force the 
Rambi system I have into submission to boot my image from USB.

https://github.com/plbossart/sound/commit/756c912a3da1c7e40bb98ea726a1508c5e0191e2

Like I said, it's fine if you want to get rid of the warning for now, I 
am not going to be able to work on this before August.

>
>>> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>>> ---
>>> sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 ------------
>>> 1 file changed, 12 deletions(-)
>>>
>>> diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
>>> index 742bc0d4e681..20755ecc7f9e 100644
>>> --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
>>> +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
>>> @@ -39,18 +39,6 @@ struct cht_mc_private {
>>> 	bool ts3a227e_present;
>>> };
>>>
>>> -static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
>>> -{
>>> -	struct snd_soc_pcm_runtime *rtd;
>>> -
>>> -	list_for_each_entry(rtd, &card->rtd_list, list) {
>>> -		if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI,
>>> -			     strlen(CHT_CODEC_DAI)))
>>> -			return rtd->codec_dai;
>>> -	}
>>> -	return NULL;
>>> -}
>>> -
>>> static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
>>> 	SND_SOC_DAPM_HP("Headphone", NULL),
>>> 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
>>>
>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Applied "ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()" to the asoc tree
  2017-05-23 19:05 [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai() Matthias Kaehlcke
  2017-05-23 19:25 ` [alsa-devel] " Pierre-Louis Bossart
@ 2017-05-24 17:42 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2017-05-24 17:42 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Mark Brown, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Yang A Fang, alsa-devel, linux-kernel,
	Douglas Anderson, alsa-devel

The patch

   ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 140385d87adce8d00864667f5132770ac5a13dac Mon Sep 17 00:00:00 2001
From: Matthias Kaehlcke <mka@chromium.org>
Date: Tue, 23 May 2017 12:05:09 -0700
Subject: [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function
 cht_get_codec_dai()

Looks like the function has never been used since it was added by commit
17119a465706 ("ASoC: Intel: Add Cherrytrail & Braswell machine driver
cht_bsw_max98090_ti"). Removing it fixes the following warning when
building with clang:

sound/soc/intel/boards/cht_bsw_max98090_ti.c:42:35: error: unused
    function 'cht_get_codec_dai' [-Werror,-Wunused-function]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index 742bc0d4e681..20755ecc7f9e 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -39,18 +39,6 @@ struct cht_mc_private {
 	bool ts3a227e_present;
 };
 
-static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
-{
-	struct snd_soc_pcm_runtime *rtd;
-
-	list_for_each_entry(rtd, &card->rtd_list, list) {
-		if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI,
-			     strlen(CHT_CODEC_DAI)))
-			return rtd->codec_dai;
-	}
-	return NULL;
-}
-
 static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
 	SND_SOC_DAPM_HP("Headphone", NULL),
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-24 17:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-23 19:05 [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai() Matthias Kaehlcke
2017-05-23 19:25 ` [alsa-devel] " Pierre-Louis Bossart
2017-05-23 19:32   ` Matthias Kaehlcke
2017-05-23 19:49     ` Pierre-Louis Bossart
2017-05-24 17:42 ` Applied "ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).