* [PATCH] sound: hda: tas2781: mark const variables as __maybe_unused
@ 2024-07-19 9:56 Arnd Bergmann
2024-07-19 16:07 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2024-07-19 9:56 UTC (permalink / raw)
To: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai
Cc: Arnd Bergmann, Gergo Koteles, Mark Brown, alsa-devel, linux-sound,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
---
include/sound/tas2781-tlv.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/sound/tas2781-tlv.h b/include/sound/tas2781-tlv.h
index 99c41bfc7827..00fd4d449ff3 100644
--- a/include/sound/tas2781-tlv.h
+++ b/include/sound/tas2781-tlv.h
@@ -16,11 +16,11 @@
#define __TAS2781_TLV_H__
static const __maybe_unused DECLARE_TLV_DB_SCALE(dvc_tlv, -10000, 100, 0);
-static const DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
-static const DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1);
+static const __maybe_unused DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
+static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1);
/* pow(10, db/20) * pow(2,30) */
-static const unsigned char tas2563_dvc_table[][4] = {
+static const __maybe_unused unsigned char tas2563_dvc_table[][4] = {
{ 0X00, 0X00, 0X00, 0X00 }, /* -121.5db */
{ 0X00, 0X00, 0X03, 0XBC }, /* -121.0db */
{ 0X00, 0X00, 0X03, 0XF5 }, /* -120.5db */
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sound: hda: tas2781: mark const variables as __maybe_unused
2024-07-19 9:56 [PATCH] sound: hda: tas2781: mark const variables as __maybe_unused Arnd Bergmann
@ 2024-07-19 16:07 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-07-19 16:07 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Arnd Bergmann, Gergo Koteles, Mark Brown, alsa-devel, linux-sound,
linux-kernel
On Fri, 19 Jul 2024 11:56:34 +0200,
Arnd Bergmann wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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 <arnd@arndb.de>
Thanks, applied now.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-19 16:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 9:56 [PATCH] sound: hda: tas2781: mark const variables as __maybe_unused Arnd Bergmann
2024-07-19 16:07 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox