lkml.org 
[lkml]   [2023]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] ASoC: tas2781: Add tas2781 driver.
Hi Shenghao,

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.2-rc6 next-20230131]
[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/Shenghao-Ding/ASoC-tas2781-Add-tas2781-driver/20230131-212221
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20230131131701.7097-1-13916275206%40139.com
patch subject: [PATCH v2] ASoC: tas2781: Add tas2781 driver.
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230201/202302010039.V0TFjmXX-lkp@intel.com/config)
compiler: sh4-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/d0782b52a1274657458fa49356eacb7c56eddf6b
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Shenghao-Ding/ASoC-tas2781-Add-tas2781-driver/20230131-212221
git checkout d0782b52a1274657458fa49356eacb7c56eddf6b
# 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=sh olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash sound/soc/

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:591:5: warning: no previous prototype for 'fw_parse_variable_header_git' [-Wmissing-prototypes]
591 | int fw_parse_variable_header_git(struct tasdevice_priv *tas_dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/tas2781-dsp.c:650:5: warning: no previous prototype for 'fw_parse_variable_header_cal' [-Wmissing-prototypes]
650 | 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:16:
sound/soc/codecs/tas2781-dsp.c: In function 'fw_parse_block_data':
>> sound/soc/codecs/tas2781-dsp.c:809:25: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
809 | "%s: File Size(%lu) 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:808:17: note: in expansion of macro 'dev_err'
808 | dev_err(tas_fmw->dev,
| ^~~~~~~
sound/soc/codecs/tas2781-dsp.c:809:42: note: format string is defined here
809 | "%s: File Size(%lu) error offset = %d n = %d\n",
| ~~^
| |
| long unsigned int
| %u
sound/soc/codecs/tas2781-dsp.c: In function 'fw_parse_header':
>> sound/soc/codecs/tas2781-dsp.c:1199:39: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
1199 | dev_err(tas_dev->dev, "File size not match, %ld %u", fmw->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:1199:17: note: in expansion of macro 'dev_err'
1199 | dev_err(tas_dev->dev, "File size not match, %ld %u", fmw->size,
| ^~~~~~~
sound/soc/codecs/tas2781-dsp.c:1199:63: note: format string is defined here
1199 | dev_err(tas_dev->dev, "File size not match, %ld %u", fmw->size,
| ~~^
| |
| long int
| %d
sound/soc/codecs/tas2781-dsp.c: In function 'tas2781_load_calibration':
sound/soc/codecs/tas2781-dsp.c:1819:33: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
1819 | "%s: file read error: size = %ld\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:1818:25: note: in expansion of macro 'dev_err'
1818 | dev_err(tas_dev->dev,
| ^~~~~~~
sound/soc/codecs/tas2781-dsp.c:1819:64: note: format string is defined here
1819 | "%s: file read error: size = %ld\n",
| ~~^
| |
| long int
| %d


vim +809 sound/soc/codecs/tas2781-dsp.c

740
741 static int fw_parse_block_data(struct tasdevice_fw *tas_fmw,
742 struct tasdevice_block *block, const struct firmware *fmw, int offset)
743 {
744 unsigned char *data = (unsigned char *)fmw->data;
745 int n;
746
747 if (offset + 4 > fmw->size) {
748 dev_err(tas_fmw->dev, "%s: mnType error\n", __func__);
749 offset = -1;
750 goto out;
751 }
752 block->type = SMS_HTONL(data[offset], data[offset + 1],
753 data[offset + 2], data[offset + 3]);
754 offset += 4;
755
756 if (tas_fmw->fw_hdr.fixed_hdr.drv_ver >=
757 PPC_DRIVER_CRCCHK) {
758 if (offset + 1 > fmw->size) {
759 dev_err(tas_fmw->dev, "%s: mbPChkSumPresent error\n",
760 __func__);
761 offset = -1;
762 goto out;
763 }
764 block->is_pchksum_present = data[offset];
765 offset++;
766
767 if (offset + 1 > fmw->size) {
768 dev_err(tas_fmw->dev, "%s: mnPChkSum error\n",
769 __func__);
770 offset = -1;
771 goto out;
772 }
773 block->pchksum = data[offset];
774 offset++;
775
776 if (offset + 1 > fmw->size) {
777 dev_err(tas_fmw->dev, "%s: mbYChkSumPresent error\n",
778 __func__);
779 offset = -1;
780 goto out;
781 }
782 block->is_ychksum_present = data[offset];
783 offset++;
784
785 if (offset + 1 > fmw->size) {
786 dev_err(tas_fmw->dev, "%s: mnYChkSum error\n",
787 __func__);
788 offset = -1;
789 goto out;
790 }
791 block->ychksum = data[offset];
792 offset++;
793 } else {
794 block->is_pchksum_present = 0;
795 block->is_ychksum_present = 0;
796 }
797 if (offset + 4 > fmw->size) {
798 dev_err(tas_fmw->dev, "%s: mnCommands error\n", __func__);
799 offset = -1;
800 goto out;
801 }
802 block->n_cmds = SMS_HTONL(data[offset], data[offset + 1],
803 data[offset + 2], data[offset + 3]);
804 offset += 4;
805
806 n = block->n_cmds * 4;
807 if (offset + n > fmw->size) {
808 dev_err(tas_fmw->dev,
> 809 "%s: File Size(%lu) error offset = %d n = %d\n",
810 __func__, fmw->size, offset, n);
811 offset = -1;
812 goto out;
813 }
814 block->data = kmemdup(&data[offset], n, GFP_KERNEL);
815 if (block->data == NULL) {
816 offset = -1;
817 goto out;
818 }
819 offset += n;
820 out:
821 return offset;
822 }
823

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

\
 
 \ /
  Last update: 2023-03-27 00:03    [W:0.053 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site