From: kernel test robot <lkp@intel.com>
To: Shenghao Ding <13916275206@139.com>,
broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
pierre-louis.bossart@linux.intel.com
Cc: oe-kbuild-all@lists.linux.dev, kevin-lu@ti.com,
shenghao-ding@ti.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, Shenghao Ding <13916275206@139.com>
Subject: Re: [PATCH v2] ASoC: tas2781: Add tas2781 driver.
Date: Tue, 31 Jan 2023 23:09:47 +0800 [thread overview]
Message-ID: <202301312243.8wxlGhpo-lkp@intel.com> (raw)
In-Reply-To: <20230131131701.7097-1-13916275206@139.com>
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: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230131/202301312243.8wxlGhpo-lkp@intel.com/config)
compiler: sparc64-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=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc 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,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/fw_parse_variable_header_git +591 sound/soc/codecs/tas2781-dsp.c
590
> 591 int fw_parse_variable_header_git(struct tasdevice_priv *tas_dev,
592 const struct firmware *fmw, int offset)
593 {
594 const unsigned char *buf = fmw->data;
595 struct tasdevice_fw *tas_fmw = tas_dev->fmw;
596 struct tasdevice_dspfw_hdr *fw_hdr = &(tas_fmw->fw_hdr);
597 int i = strlen((char *)&buf[offset]);
598
599 i++;
600
601 if (offset + i > fmw->size) {
602 dev_err(tas_dev->dev, "%s: File Size error\n", __func__);
603 offset = -1;
604 goto out;
605 }
606
607 offset += i;
608
609 if (offset + 4 > fmw->size) {
610 dev_err(tas_dev->dev, "%s: File Size error\n", __func__);
611 offset = -1;
612 goto out;
613 }
614 fw_hdr->device_family = SMS_HTONL(buf[offset], buf[offset + 1],
615 buf[offset + 2], buf[offset + 3]);
616 if (fw_hdr->device_family != 0) {
617 dev_err(tas_dev->dev, "ERROR:%s: not TAS device\n", __func__);
618 offset = -1;
619 goto out;
620 }
621 offset += 4;
622 if (offset + 4 > fmw->size) {
623 dev_err(tas_dev->dev, "%s: File Size error\n", __func__);
624 offset = -1;
625 goto out;
626 }
627 fw_hdr->device = SMS_HTONL(buf[offset], buf[offset + 1],
628 buf[offset + 2], buf[offset + 3]);
629 if (fw_hdr->device >= TASDEVICE_DSP_TAS_MAX_DEVICE ||
630 fw_hdr->device == 6) {
631 dev_err(tas_dev->dev, "ERROR:%s: not support device %d\n",
632 __func__, fw_hdr->device);
633 offset = -1;
634 goto out;
635 }
636 offset += 4;
637 fw_hdr->ndev = deviceNumber[fw_hdr->device];
638 if (fw_hdr->ndev != tas_dev->ndev) {
639 dev_err(tas_dev->dev,
640 "%s: ndev(%u) in dspbin dismatch ndev(%u) in DTS\n",
641 __func__, fw_hdr->ndev,
642 tas_dev->ndev);
643 offset = -1;
644 }
645
646 out:
647 return offset;
648 }
649
> 650 int fw_parse_variable_header_cal(struct tasdevice_priv *tas_dev,
651 struct tasdevice_fw *tas_fmw, const struct firmware *fmw, int offset)
652 {
653 const unsigned char *buf = fmw->data;
654 struct tasdevice_dspfw_hdr *fw_hdr = &(tas_fmw->fw_hdr);
655 int i = strlen((char *)&buf[offset]);
656
657 i++;
658
659 if (offset + i > fmw->size) {
660 dev_err(tas_dev->dev, "%s: File Size error\n", __func__);
661 offset = -1;
662 goto out;
663 }
664
665 offset += i;
666
667 if (offset + 4 > fmw->size) {
668 dev_err(tas_dev->dev, "%s: mnDeviceFamily error\n", __func__);
669 offset = -1;
670 goto out;
671 }
672 fw_hdr->device_family = SMS_HTONL(buf[offset], buf[offset + 1],
673 buf[offset + 2], buf[offset + 3]);
674 if (fw_hdr->device_family != 0) {
675 dev_err(tas_dev->dev, "ERROR:%s: not TAS device\n", __func__);
676 offset = -1;
677 goto out;
678 }
679 offset += 4;
680 if (offset + 4 > fmw->size) {
681 dev_err(tas_dev->dev, "%s: mnDevice error\n", __func__);
682 offset = -1;
683 goto out;
684 }
685 fw_hdr->device = SMS_HTONL(buf[offset], buf[offset + 1],
686 buf[offset + 2], buf[offset + 3]);
687 if (fw_hdr->device >= TASDEVICE_DSP_TAS_MAX_DEVICE ||
688 fw_hdr->device == 6) {
689 dev_err(tas_dev->dev, "ERROR:%s: not support device %d\n",
690 __func__, fw_hdr->device);
691 offset = -1;
692 goto out;
693 }
694 offset += 4;
695 fw_hdr->ndev = deviceNumber[fw_hdr->device];
696 if (fw_hdr->ndev != 1) {
697 dev_err(tas_dev->dev,
698 "%s: calbin must be 1, but currently ndev(%u)\n",
699 __func__, fw_hdr->ndev);
700 offset = -1;
701 }
702
703 out:
704 return offset;
705 }
706
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-01-31 15:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 13:17 [PATCH v2] ASoC: tas2781: Add tas2781 driver Shenghao Ding
2023-01-31 15:09 ` kernel test robot [this message]
2023-01-31 16:23 ` kernel test robot
2023-01-31 22:54 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202301312243.8wxlGhpo-lkp@intel.com \
--to=lkp@intel.com \
--cc=13916275206@139.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kevin-lu@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=shenghao-ding@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox