Hi Andy
-----Original Message----- From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Sent: Thursday, August 22, 2024 9:37 PM To: Ding, Shenghao <shenghao-ding@ti.com> Cc: broonie@kernel.org; lgirdwood@gmail.com; perex@perex.cz; pierre- louis.bossart@linux.intel.com; 13916275206@139.com; zhourui@huaqin.com; alsa-devel@alsa-project.org; Salazar, Ivan <i-salazar@ti.com>; liam.r.girdwood@intel.com; Yue, Jaden <jaden-yue@ti.com>; yung- chuan.liao@linux.intel.com; Rao, Dipa <dipa@ti.com>; yuhsuan@google.com; Lo, Henry <henry.lo@ti.com>; tiwai@suse.de; Xu, Baojun <baojun.xu@ti.com>; Baojun.Xu@fpt.com; judyhsiao@google.com; Navada Kanyana, Mukund <navada@ti.com>; cujomalainey@google.com; Kutty, Aanya <aanya@ti.com>; Mahmud, Nayeem <nayeem.mahmud@ti.com>; savyasanchi.shukla@netradyne.com; flaviopr@microsoft.com; Ji, Jesse <jesse- ji@ti.com>; darren.ye@mediatek.com; antheas.dk@gmail.com; Jerry2.Huang@lcfuturecenter.com; jim.shil@goertek.com Subject: [EXTERNAL] Re: [PATCH v1] ASoC: tas2781: mark const variables tas2563_dvc_table as __maybe_unused
On Thu, Aug 22, 2024 at 02: 32: 02PM +0800, Shenghao Ding wrote: > In case of tas2781, tas2563_dvc_table will be unused, > so mark it as __maybe_unused. .. . > /* pow(10, db/20) * pow(2,30) */ > -static const unsigned char tas2563_dvc_table[][4] ZjQcmQRYFpfptBannerStart This message was sent from outside of Texas Instruments. Do not click links or open attachments unless you recognize the source of this email and know the content is safe. <https://us-phishalarm- ewt.proofpoint.com/EWT/v1/G3vK!uBdnVX3s10EX4c1lMjuP1KAZd1FtZu8IE3w e26la-l_qE1qOQYSYSYJP5KwPFaP8DA2Q7tdwFqW-YXqzA5Y$> Report Suspicious
ZjQcmQRYFpfptBannerEnd On Thu, Aug 22, 2024 at 02:32:02PM +0800, Shenghao Ding wrote:
In case of tas2781, tas2563_dvc_table will be unused, so mark it as __maybe_unused.
...
/* 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 */
As far as I can see in the latest Linux Next the above mentioned table is used solely in sound/soc/codecs/tas2781-i2c.c. Why not moving it to the C file instead? We have a big plan to implement the digital gain for tas2563 in the side codec driver too, so abstracted this table into a separated header file.
-- With Best Regards, Andy Shevchenko