All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sound: pci: hda: patch_analog.c:  Remove some unused functions
@ 2014-12-21 12:35 ` Rickard Strandqvist
  0 siblings, 0 replies; 3+ messages in thread
From: Rickard Strandqvist @ 2014-12-21 12:35 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: Rickard Strandqvist, alsa-devel, linux-kernel

Removes some functions that are not used anywhere:
ad198x_ch_mode_get() ad198x_ch_mode_info() ad198x_ch_mode_info()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 sound/pci/hda/patch_analog.c |   33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 06275f8..0e76dcc 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -697,39 +697,6 @@ static int patch_ad1981(struct hda_codec *codec)
  *      E/F quad mic array
  */
 
-#ifdef ENABLE_AD_STATIC_QUIRKS
-static int ad198x_ch_mode_info(struct snd_kcontrol *kcontrol,
-			       struct snd_ctl_elem_info *uinfo)
-{
-	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct ad198x_spec *spec = codec->spec;
-	return snd_hda_ch_mode_info(codec, uinfo, spec->channel_mode,
-				    spec->num_channel_mode);
-}
-
-static int ad198x_ch_mode_get(struct snd_kcontrol *kcontrol,
-			      struct snd_ctl_elem_value *ucontrol)
-{
-	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct ad198x_spec *spec = codec->spec;
-	return snd_hda_ch_mode_get(codec, ucontrol, spec->channel_mode,
-				   spec->num_channel_mode, spec->multiout.max_channels);
-}
-
-static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol,
-			      struct snd_ctl_elem_value *ucontrol)
-{
-	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct ad198x_spec *spec = codec->spec;
-	int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
-				      spec->num_channel_mode,
-				      &spec->multiout.max_channels);
-	if (err >= 0 && spec->need_dac_fix)
-		spec->multiout.num_dacs = spec->multiout.max_channels / 2;
-	return err;
-}
-#endif /* ENABLE_AD_STATIC_QUIRKS */
-
 static int ad1988_auto_smux_enum_info(struct snd_kcontrol *kcontrol,
 				      struct snd_ctl_elem_info *uinfo)
 {
-- 
1.7.10.4


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

* [PATCH] sound: pci: hda: patch_analog.c: Remove some unused functions
@ 2014-12-21 12:35 ` Rickard Strandqvist
  0 siblings, 0 replies; 3+ messages in thread
From: Rickard Strandqvist @ 2014-12-21 12:35 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, linux-kernel, Rickard Strandqvist

Removes some functions that are not used anywhere:
ad198x_ch_mode_get() ad198x_ch_mode_info() ad198x_ch_mode_info()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 sound/pci/hda/patch_analog.c |   33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 06275f8..0e76dcc 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -697,39 +697,6 @@ static int patch_ad1981(struct hda_codec *codec)
  *      E/F quad mic array
  */
 
-#ifdef ENABLE_AD_STATIC_QUIRKS
-static int ad198x_ch_mode_info(struct snd_kcontrol *kcontrol,
-			       struct snd_ctl_elem_info *uinfo)
-{
-	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct ad198x_spec *spec = codec->spec;
-	return snd_hda_ch_mode_info(codec, uinfo, spec->channel_mode,
-				    spec->num_channel_mode);
-}
-
-static int ad198x_ch_mode_get(struct snd_kcontrol *kcontrol,
-			      struct snd_ctl_elem_value *ucontrol)
-{
-	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct ad198x_spec *spec = codec->spec;
-	return snd_hda_ch_mode_get(codec, ucontrol, spec->channel_mode,
-				   spec->num_channel_mode, spec->multiout.max_channels);
-}
-
-static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol,
-			      struct snd_ctl_elem_value *ucontrol)
-{
-	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct ad198x_spec *spec = codec->spec;
-	int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
-				      spec->num_channel_mode,
-				      &spec->multiout.max_channels);
-	if (err >= 0 && spec->need_dac_fix)
-		spec->multiout.num_dacs = spec->multiout.max_channels / 2;
-	return err;
-}
-#endif /* ENABLE_AD_STATIC_QUIRKS */
-
 static int ad1988_auto_smux_enum_info(struct snd_kcontrol *kcontrol,
 				      struct snd_ctl_elem_info *uinfo)
 {
-- 
1.7.10.4

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

* Re: [PATCH] sound: pci: hda: patch_analog.c:  Remove some unused functions
  2014-12-21 12:35 ` Rickard Strandqvist
  (?)
@ 2014-12-25 10:17 ` Takashi Iwai
  -1 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2014-12-25 10:17 UTC (permalink / raw)
  To: Rickard Strandqvist; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

At Sun, 21 Dec 2014 13:35:12 +0100,
Rickard Strandqvist wrote:
> 
> Removes some functions that are not used anywhere:
> ad198x_ch_mode_get() ad198x_ch_mode_info() ad198x_ch_mode_info()
> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>

OK, you sent it already...  Applied now.

thanks,

Takashi

> ---
>  sound/pci/hda/patch_analog.c |   33 ---------------------------------
>  1 file changed, 33 deletions(-)
> 
> diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
> index 06275f8..0e76dcc 100644
> --- a/sound/pci/hda/patch_analog.c
> +++ b/sound/pci/hda/patch_analog.c
> @@ -697,39 +697,6 @@ static int patch_ad1981(struct hda_codec *codec)
>   *      E/F quad mic array
>   */
>  
> -#ifdef ENABLE_AD_STATIC_QUIRKS
> -static int ad198x_ch_mode_info(struct snd_kcontrol *kcontrol,
> -			       struct snd_ctl_elem_info *uinfo)
> -{
> -	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
> -	struct ad198x_spec *spec = codec->spec;
> -	return snd_hda_ch_mode_info(codec, uinfo, spec->channel_mode,
> -				    spec->num_channel_mode);
> -}
> -
> -static int ad198x_ch_mode_get(struct snd_kcontrol *kcontrol,
> -			      struct snd_ctl_elem_value *ucontrol)
> -{
> -	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
> -	struct ad198x_spec *spec = codec->spec;
> -	return snd_hda_ch_mode_get(codec, ucontrol, spec->channel_mode,
> -				   spec->num_channel_mode, spec->multiout.max_channels);
> -}
> -
> -static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol,
> -			      struct snd_ctl_elem_value *ucontrol)
> -{
> -	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
> -	struct ad198x_spec *spec = codec->spec;
> -	int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
> -				      spec->num_channel_mode,
> -				      &spec->multiout.max_channels);
> -	if (err >= 0 && spec->need_dac_fix)
> -		spec->multiout.num_dacs = spec->multiout.max_channels / 2;
> -	return err;
> -}
> -#endif /* ENABLE_AD_STATIC_QUIRKS */
> -
>  static int ad1988_auto_smux_enum_info(struct snd_kcontrol *kcontrol,
>  				      struct snd_ctl_elem_info *uinfo)
>  {
> -- 
> 1.7.10.4
> 

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

end of thread, other threads:[~2014-12-25 10:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-21 12:35 [PATCH] sound: pci: hda: patch_analog.c: Remove some unused functions Rickard Strandqvist
2014-12-21 12:35 ` Rickard Strandqvist
2014-12-25 10:17 ` 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.