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-Instr... 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: s390-allyesconfig compiler: s390-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/de2ce420cebecc02e8b8f1eda156c6... 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=s390 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash sound/soc/codecs/
If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot lkp@intel.com
All warnings (new ones prefixed by >>):
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 +875 sound/soc/codecs/tas2781-dsp.c
806 807 static int fw_parse_block_data(struct TFirmware *pFirmware, 808 struct TBlock *pBlock, const struct firmware *pFW, int offset) 809 { 810 unsigned char *pData = (unsigned char *)pFW->data; 811 int n; 812 813 if (offset + 4 > pFW->size) { 814 dev_err(pFirmware->dev, "%s: mnType error\n", __func__); 815 offset = -1; 816 goto out; 817 } 818 pBlock->mnType = SMS_HTONL(pData[offset], 819 pData[offset + 1], pData[offset + 2], pData[offset + 3]); 820 offset += 4; 821 822 if (pFirmware->fw_hdr.mnFixedHdr.mnDriverVersion >= 823 PPC_DRIVER_CRCCHK) { 824 if (offset + 1 > pFW->size) { 825 dev_err(pFirmware->dev, "%s: mbPChkSumPresent error\n", 826 __func__); 827 offset = -1; 828 goto out; 829 } 830 pBlock->mbPChkSumPresent = pData[offset]; 831 offset++; 832 833 if (offset + 1 > pFW->size) { 834 dev_err(pFirmware->dev, "%s: mnPChkSum error\n", 835 __func__); 836 offset = -1; 837 goto out; 838 } 839 pBlock->mnPChkSum = pData[offset]; 840 offset++; 841 842 if (offset + 1 > pFW->size) { 843 dev_err(pFirmware->dev, "%s: mbYChkSumPresent error\n", 844 __func__); 845 offset = -1; 846 goto out; 847 } 848 pBlock->mbYChkSumPresent = pData[offset]; 849 offset++; 850 851 if (offset + 1 > pFW->size) { 852 dev_err(pFirmware->dev, "%s: mnYChkSum error\n", 853 __func__); 854 offset = -1; 855 goto out; 856 } 857 pBlock->mnYChkSum = pData[offset]; 858 offset++; 859 } else { 860 pBlock->mbPChkSumPresent = 0; 861 pBlock->mbYChkSumPresent = 0; 862 } 863 if (offset + 4 > pFW->size) { 864 dev_err(pFirmware->dev, "%s: mnCommands error\n", __func__); 865 offset = -1; 866 goto out; 867 } 868 pBlock->mnCommands = SMS_HTONL(pData[offset], 869 pData[offset + 1], pData[offset + 2], pData[offset + 3]); 870 offset += 4; 871 872 n = pBlock->mnCommands * 4; 873 if (offset + n > pFW->size) { 874 dev_err(pFirmware->dev,
875 "%s: File Size(%u) error offset = %d n = %d\n",
876 __func__, pFW->size, offset, n); 877 offset = -1; 878 goto out; 879 } 880 pBlock->mpData = kmemdup(&pData[offset], n, GFP_KERNEL); 881 if (pBlock->mpData == NULL) { 882 offset = -1; 883 goto out; 884 } 885 offset += n; 886 out: 887 return offset; 888 } 889