public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] ALSA: hda: tas2563: mark const variables as __maybe_unused
@ 2024-08-14 12:20 Shenghao Ding
  2024-08-14 13:41 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Shenghao Ding @ 2024-08-14 12:20 UTC (permalink / raw)
  To: broonie
  Cc: andriy.shevchenko, lgirdwood, perex, pierre-louis.bossart,
	13564923607, alsa-devel, linux-kernel, liam.r.girdwood,
	cameron.berkenpas, tiwai, baojun.xu, soyer, Baojun.Xu, robinchen,
	Shenghao Ding

From: Baojun Xu <baojun.xu@ti.com>

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/tas2563-tlv.h:21:28: error: 'tas2563_dvc_table' defined but not used [-Werror=unused-const-variable=]
   21 | static const unsigned char tas2563_dvc_table[][4] = {
      |                            ^~~~~~~~~~~~~~~~~                                 ^~~~~~~~~~~~~~~

Mark it as unused as well.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>

---
v1:
---
 include/sound/tas2563-tlv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/sound/tas2563-tlv.h b/include/sound/tas2563-tlv.h
index faa3e194f73b..bb269b21f460 100644
--- a/include/sound/tas2563-tlv.h
+++ b/include/sound/tas2563-tlv.h
@@ -18,7 +18,7 @@
 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.43.0


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

* Re: [PATCH v1] ALSA: hda: tas2563: mark const variables as __maybe_unused
  2024-08-14 12:20 [PATCH v1] ALSA: hda: tas2563: mark const variables as __maybe_unused Shenghao Ding
@ 2024-08-14 13:41 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-08-14 13:41 UTC (permalink / raw)
  To: Shenghao Ding
  Cc: broonie, andriy.shevchenko, lgirdwood, perex,
	pierre-louis.bossart, 13564923607, alsa-devel, linux-kernel,
	liam.r.girdwood, cameron.berkenpas, baojun.xu, soyer, Baojun.Xu,
	robinchen

On Wed, 14 Aug 2024 14:20:42 +0200,
Shenghao Ding wrote:
> 
> From: Baojun Xu <baojun.xu@ti.com>
> 
> 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/tas2563-tlv.h:21:28: error: 'tas2563_dvc_table' defined but not used [-Werror=unused-const-variable=]
>    21 | static const unsigned char tas2563_dvc_table[][4] = {
>       |                            ^~~~~~~~~~~~~~~~~                                 ^~~~~~~~~~~~~~~
> 
> Mark it as unused as well.
> 
> Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>

This isn't found in my tree, maybe found only in Mark's tree?

In anyway, you should put Fixes tag.


Takashi

> 
> ---
> v1:
> ---
>  include/sound/tas2563-tlv.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/sound/tas2563-tlv.h b/include/sound/tas2563-tlv.h
> index faa3e194f73b..bb269b21f460 100644
> --- a/include/sound/tas2563-tlv.h
> +++ b/include/sound/tas2563-tlv.h
> @@ -18,7 +18,7 @@
>  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.43.0
> 

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

end of thread, other threads:[~2024-08-14 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14 12:20 [PATCH v1] ALSA: hda: tas2563: mark const variables as __maybe_unused Shenghao Ding
2024-08-14 13:41 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox