diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-25 04:54:07 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-25 12:32:14 -0500 |
commit | 86b2723725a2e186f5699d97cb20014fa893931f (patch) | |
tree | 844f9f196c14bf3f361e85ec28b5ad60e334dcc0 /sound/drivers | |
parent | f4f678d22219f5821f46bb78eb4da7f76f1899bc (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/drivers')
-rw-r--r-- | sound/drivers/vx/vx_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index de5055a3b0d0..c39961c11401 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c | |||
@@ -52,7 +52,6 @@ MODULE_LICENSE("GPL"); | |||
52 | int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time) | 52 | int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time) |
53 | { | 53 | { |
54 | unsigned long end_time = jiffies + (time * HZ + 999) / 1000; | 54 | unsigned long end_time = jiffies + (time * HZ + 999) / 1000; |
55 | #ifdef CONFIG_SND_DEBUG | ||
56 | static char *reg_names[VX_REG_MAX] = { | 55 | static char *reg_names[VX_REG_MAX] = { |
57 | "ICR", "CVR", "ISR", "IVR", "RXH", "RXM", "RXL", | 56 | "ICR", "CVR", "ISR", "IVR", "RXH", "RXM", "RXL", |
58 | "DMA", "CDSP", "RFREQ", "RUER/V2", "DATA", "MEMIRQ", | 57 | "DMA", "CDSP", "RFREQ", "RUER/V2", "DATA", "MEMIRQ", |
@@ -60,7 +59,7 @@ int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int t | |||
60 | "MIC3", "INTCSR", "CNTRL", "GPIOC", | 59 | "MIC3", "INTCSR", "CNTRL", "GPIOC", |
61 | "LOFREQ", "HIFREQ", "CSUER", "RUER" | 60 | "LOFREQ", "HIFREQ", "CSUER", "RUER" |
62 | }; | 61 | }; |
63 | #endif | 62 | |
64 | do { | 63 | do { |
65 | if ((snd_vx_inb(chip, reg) & mask) == bit) | 64 | if ((snd_vx_inb(chip, reg) & mask) == bit) |
66 | return 0; | 65 | return 0; |