Skip to content

Commit a2d6d8a

Browse files
arndbtiwai
authored andcommitted
ALSA: hda: tas2781: mark const variables as __maybe_unused
An earlier patch changed the DECLARE_TLV_DB_SCALE declaration, but now there are additional static const variables that cause the same build warnings: In file included from sound/pci/hda/tas2781_hda_i2c.c:23: include/sound/tas2781-tlv.h:23:28: error: 'tas2563_dvc_table' defined but not used [-Werror=unused-const-variable=] 23 | static const unsigned char tas2563_dvc_table[][4] = { | ^~~~~~~~~~~~~~~~~ In file included from include/sound/tlv.h:10, from sound/pci/hda/tas2781_hda_i2c.c:22: include/sound/tas2781-tlv.h:20:35: error: 'tas2563_dvc_tlv' defined but not used [-Werror=unused-const-variable=] 20 | static const DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1); | ^~~~~~~~~~~~~~~ Mark them all as unused as well. Signed-off-by: Arnd Bergmann <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 74dba24 commit a2d6d8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/sound/tas2781-tlv.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#define __TAS2781_TLV_H__
1717

1818
static const __maybe_unused DECLARE_TLV_DB_SCALE(dvc_tlv, -10000, 100, 0);
19-
static const DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
20-
static const DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1);
19+
static const __maybe_unused DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
20+
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1);
2121

2222
/* pow(10, db/20) * pow(2,30) */
23-
static const unsigned char tas2563_dvc_table[][4] = {
23+
static const __maybe_unused unsigned char tas2563_dvc_table[][4] = {
2424
{ 0X00, 0X00, 0X00, 0X00 }, /* -121.5db */
2525
{ 0X00, 0X00, 0X03, 0XBC }, /* -121.0db */
2626
{ 0X00, 0X00, 0X03, 0XF5 }, /* -120.5db */

0 commit comments

Comments
 (0)