lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Dec 2022 22:38:40 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kevin Lu <luminlong@....com>, lgirdwood@...il.com,
        broonie@...nel.org, perex@...ex.cz, tiwai@...e.com
Cc:     oe-kbuild-all@...ts.linux.dev, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, shenghao-ding@...com,
        kevin-lu@...com, navada@...com, peeyush@...com,
        Kevin Lu <luminlong@....com>
Subject: Re: [PATCH v1] ALSA SoC: Texas Instruments TAS2781 Audio Smart Amp

Hi Kevin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on linus/master v6.1 next-20221220]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Kevin-Lu/ALSA-SoC-Texas-Instruments-TAS2781-Audio-Smart-Amp/20221220-231421
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20221220151157.2247-1-luminlong%40139.com
patch subject: [PATCH v1] ALSA SoC: Texas Instruments TAS2781 Audio Smart Amp
config: arm64-randconfig-r033-20221219
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/de2ce420cebecc02e8b8f1eda156c623f9e8bc37
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Kevin-Lu/ALSA-SoC-Texas-Instruments-TAS2781-Audio-Smart-Amp/20221220-231421
        git checkout de2ce420cebecc02e8b8f1eda156c623f9e8bc37
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/net/ kernel/bpf/ sound/soc/codecs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/tas2781-i2c.c:241:6: warning: no previous prototype for 'tasdevice_select_cfg_blk' [-Wmissing-prototypes]
     241 | void tasdevice_select_cfg_blk(void *pContext, int conf_no,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-i2c.c:831:6: warning: no previous prototype for 'tasdevice_regbin_ready' [-Wmissing-prototypes]
     831 | void tasdevice_regbin_ready(const struct firmware *pFW,
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-i2c.c:1005:6: warning: no previous prototype for 'tasdevice_config_info_remove' [-Wmissing-prototypes]
    1005 | void tasdevice_config_info_remove(void *pContext)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-i2c.c:1433:5: warning: no previous prototype for 'tasdevice_parse_dt' [-Wmissing-prototypes]
    1433 | int tasdevice_parse_dt(struct tasdevice_priv *tas_dev)
         |     ^~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-i2c.c:2005:6: warning: no previous prototype for 'tasdevice_remove' [-Wmissing-prototypes]
    2005 | void tasdevice_remove(struct tasdevice_priv *tas_dev)
         |      ^~~~~~~~~~~~~~~~
--
>> sound/soc/codecs/tas2781-dsp.c:226:5: warning: no previous prototype for 'fw_parse_program_data_kernel' [-Wmissing-prototypes]
     226 | int fw_parse_program_data_kernel(struct tasdevice_priv *tas_dev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-dsp.c:298:5: warning: no previous prototype for 'fw_parse_configuration_data_kernel' [-Wmissing-prototypes]
     298 | int fw_parse_configuration_data_kernel(
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-dsp.c:398:5: warning: no previous prototype for 'fw_parse_variable_header_kernel' [-Wmissing-prototypes]
     398 | int fw_parse_variable_header_kernel(struct tasdevice_priv *tas_dev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-dsp.c:536:5: warning: no previous prototype for 'tasdevice_load_block_kernel' [-Wmissing-prototypes]
     536 | int tasdevice_load_block_kernel(struct tasdevice_priv *pTAS2781,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-dsp.c:650:5: warning: no previous prototype for 'fw_parse_variable_header_git' [-Wmissing-prototypes]
     650 | int fw_parse_variable_header_git(struct tasdevice_priv *tas_dev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/tas2781-dsp.c:712:5: warning: no previous prototype for 'fw_parse_variable_header_cal' [-Wmissing-prototypes]
     712 | int fw_parse_variable_header_cal(struct tasdevice_priv *tas_dev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/device.h:15,
                    from include/linux/acpi.h:15,
                    from include/linux/i2c.h:13,
                    from sound/soc/codecs/tas2781-dsp.c:17:
   sound/soc/codecs/tas2781-dsp.c: In function 'fw_parse_block_data':
>> sound/soc/codecs/tas2781-dsp.c:875:25: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
     875 |                         "%s: File Size(%u) error offset = %d n = %d\n",
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   sound/soc/codecs/tas2781-dsp.c:874:17: note: in expansion of macro 'dev_err'
     874 |                 dev_err(pFirmware->dev,
         |                 ^~~~~~~
   sound/soc/codecs/tas2781-dsp.c:875:41: note: format string is defined here
     875 |                         "%s: File Size(%u) error offset = %d n = %d\n",
         |                                        ~^
         |                                         |
         |                                         unsigned int
         |                                        %lu
   sound/soc/codecs/tas2781-dsp.c: In function 'fw_parse_header':
>> sound/soc/codecs/tas2781-dsp.c:1312:39: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
    1312 |                 dev_err(tas_dev->dev, "File size not match, %d %d", pFW->size,
         |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   sound/soc/codecs/tas2781-dsp.c:1312:17: note: in expansion of macro 'dev_err'
    1312 |                 dev_err(tas_dev->dev, "File size not match, %d %d", pFW->size,
         |                 ^~~~~~~
   sound/soc/codecs/tas2781-dsp.c:1312:62: note: format string is defined here
    1312 |                 dev_err(tas_dev->dev, "File size not match, %d %d", pFW->size,
         |                                                             ~^
         |                                                              |
         |                                                              int
         |                                                             %ld
   sound/soc/codecs/tas2781-dsp.c: In function 'tas2781_load_calibration':
   sound/soc/codecs/tas2781-dsp.c:1986:33: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
    1986 |                                 "%s: file read error: size = %d\n",
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   sound/soc/codecs/tas2781-dsp.c:1985:25: note: in expansion of macro 'dev_err'
    1985 |                         dev_err(tas_dev->dev,
         |                         ^~~~~~~
   sound/soc/codecs/tas2781-dsp.c:1986:63: note: format string is defined here
    1986 |                                 "%s: file read error: size = %d\n",
         |                                                              ~^
         |                                                               |
         |                                                               int
         |                                                              %ld


vim +/tasdevice_select_cfg_blk +241 sound/soc/codecs/tas2781-i2c.c

   240	
 > 241	void tasdevice_select_cfg_blk(void *pContext, int conf_no,
   242		unsigned char block_type)
   243	{
   244		struct tasdevice_priv *tas_dev =
   245			(struct tasdevice_priv *) pContext;
   246		struct tasdevice_regbin *regbin = &(tas_dev->mtRegbin);
   247		struct tasdevice_config_info **cfg_info = regbin->cfg_info;
   248		int j = 0, k = 0, chn = 0, chnend = 0;
   249	
   250		if (conf_no >= regbin->ncfgs || conf_no < 0 || NULL == cfg_info) {
   251			dev_err(tas_dev->dev,
   252				"conf_no should be not more than %u\n",
   253				regbin->ncfgs);
   254			goto out;
   255		} else
   256			dev_info(tas_dev->dev,
   257				"select_cfg_blk: profile_conf_id = %d\n",
   258				conf_no);
   259	
   260		for (j = 0; j < (int)cfg_info[conf_no]->real_nblocks; j++) {
   261			unsigned int length = 0, rc = 0;
   262	
   263			if (block_type > 5 || block_type < 2) {
   264				dev_err(tas_dev->dev,
   265				"ERROR!!!block_type should be in range from 2 to 5\n");
   266				goto out;
   267			}
   268			if (block_type != cfg_info[conf_no]->blk_data[j]->block_type)
   269				continue;
   270			dev_info(tas_dev->dev,
   271			"select_cfg_blk: conf %d, block type:%s\t device idx = 0x%02x\n",
   272			conf_no, blocktype[cfg_info[conf_no]->blk_data[j]
   273			->block_type-1], cfg_info[conf_no]->blk_data[j]
   274			->dev_idx);
   275	
   276			for (k = 0; k < (int)cfg_info[conf_no]->blk_data[j]
   277				->nSublocks; k++) {
   278				if (cfg_info[conf_no]->blk_data[j]->dev_idx) {
   279					chn =
   280					cfg_info[conf_no]->blk_data[j]->dev_idx
   281					- 1;
   282					chnend =
   283					cfg_info[conf_no]->blk_data[j]->dev_idx;
   284				} else {
   285					chn = 0;
   286					chnend = tas_dev->ndev;
   287				}
   288				for (; chn < chnend; chn++)
   289					tas_dev->tasdevice[chn].bLoading = true;
   290	
   291				rc = tasdevice_process_block(tas_dev,
   292					cfg_info[conf_no]->blk_data[j]->regdata +
   293						length,
   294					cfg_info[conf_no]->blk_data[j]->dev_idx,
   295					cfg_info[conf_no]->blk_data[j]->block_size -
   296						length);
   297				length  += rc;
   298				if (cfg_info[conf_no]->blk_data[j]->block_size <
   299					length) {
   300					dev_err(tas_dev->dev,
   301						"select_cfg_blk: ERROR:%u %u out of memory\n",
   302						length,
   303						cfg_info[conf_no]->blk_data[j]->block_size);
   304					break;
   305				}
   306			}
   307			if (length != cfg_info[conf_no]->blk_data[j]->block_size)
   308				dev_err(tas_dev->dev,
   309					"select_cfg_blk: ERROR: %u %u size is not same\n",
   310					length,
   311					cfg_info[conf_no]->blk_data[j]->block_size);
   312	
   313		}
   314	
   315	out:
   316		return;
   317	}
   318	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (185933 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ