aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-25 04:54:07 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-25 12:32:14 -0500
commit86b2723725a2e186f5699d97cb20014fa893931f (patch)
tree844f9f196c14bf3f361e85ec28b5ad60e334dcc0 /sound/pci/hda
parentf4f678d22219f5821f46bb78eb4da7f76f1899bc (diff)
ALSA: Make snd_printd() and snd_printdd() inline
Because currently snd_printd() and snd_printdd() macros are expanded to empty when CONFIG_SND_DEBUG=n, a compile warning like below appears sometimes, and we had to covert it by ugly ifdefs: sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’: sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable] For "fixing" these issues better, this patch replaces snd_printd() and snd_printdd() definitions with empty inline functions instead of macros. This should have the same effect but shut up warnings like above. But since we had already put ifdefs, changing to inline functions would trigger compile errors. So, such ifdefs is removed in this patch. In addition, snd_pci_quirk name field is defined only when CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in snd_printdd() argument triggers the build errors, too. For avoiding these errors, introduce a new macro snd_pci_quirk_name() that is defined no matter how the debug option is set. Reported-by: Stratos Karafotis <stratosk@semaphore.gr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_auto_parser.c2
-rw-r--r--sound/pci/hda/hda_generic.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
index 96a05c4c28e1..a3ea76a4c9d2 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -698,9 +698,7 @@ static void set_pin_targets(struct hda_codec *codec,
698 698
699static void apply_fixup(struct hda_codec *codec, int id, int action, int depth) 699static void apply_fixup(struct hda_codec *codec, int id, int action, int depth)
700{ 700{
701#ifdef CONFIG_SND_DEBUG_VERBOSE
702 const char *modelname = codec->fixup_name; 701 const char *modelname = codec->fixup_name;
703#endif
704 702
705 while (id >= 0) { 703 while (id >= 0) {
706 const struct hda_fixup *fix = codec->fixup_list + id; 704 const struct hda_fixup *fix = codec->fixup_list + id;
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 19d014a6a40e..c4ba3066a013 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -1579,9 +1579,7 @@ static void debug_show_configs(struct hda_codec *codec,
1579 struct auto_pin_cfg *cfg) 1579 struct auto_pin_cfg *cfg)
1580{ 1580{
1581 struct hda_gen_spec *spec = codec->spec; 1581 struct hda_gen_spec *spec = codec->spec;
1582#ifdef CONFIG_SND_DEBUG_VERBOSE
1583 static const char * const lo_type[3] = { "LO", "SP", "HP" }; 1582 static const char * const lo_type[3] = { "LO", "SP", "HP" };
1584#endif
1585 int i; 1583 int i;
1586 1584
1587 debug_badness("multi_outs = %x/%x/%x/%x : %x/%x/%x/%x (type %s)\n", 1585 debug_badness("multi_outs = %x/%x/%x/%x : %x/%x/%x/%x (type %s)\n",