mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	kevin-lu@ti.com, shenghao-ding@ti.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	x1077012@ti.com, peeyush@ti.com, navada@ti.com,
	Shenghao Ding <13916275206@139.com>
Subject: Re: [PATCH v6] ASoC: tas2781: Add tas2781 driver
Date: Sat, 25 Mar 2023 16:16:58 +0800	[thread overview]
Message-ID: <202303251653.7HZjyxTf-lkp@intel.com> (raw)
In-Reply-To: <20230324110755.27652-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.3-rc3 next-20230323]
[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/20230324-190955
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20230324110755.27652-1-13916275206%40139.com
patch subject: [PATCH v6] ASoC: tas2781: Add tas2781 driver
config: arm-randconfig-r021-20230322 (https://download.01.org/0day-ci/archive/20230325/202303251653.7HZjyxTf-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/intel-lab-lkp/linux/commit/ae727fb08bb90265d16859aa62c7c956e46841ee
        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/20230324-190955
        git checkout ae727fb08bb90265d16859aa62c7c956e46841ee
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm 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>
| Link: https://lore.kernel.org/oe-kbuild-all/202303251653.7HZjyxTf-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/tas2781-dsp.c:1357:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (in) {
               ^~
   sound/soc/codecs/tas2781-dsp.c:1378:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   sound/soc/codecs/tas2781-dsp.c:1357:2: note: remove the 'if' if its condition is always true
           if (in) {
           ^~~~~~~~
   sound/soc/codecs/tas2781-dsp.c:1343:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   sound/soc/codecs/tas2781-dsp.c:1407:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (in) {
               ^~
   sound/soc/codecs/tas2781-dsp.c:1444:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   sound/soc/codecs/tas2781-dsp.c:1407:2: note: remove the 'if' if its condition is always true
           if (in) {
           ^~~~~~~~
   sound/soc/codecs/tas2781-dsp.c:1388:9: note: initialize the variable 'ret' to silence this warning
           int ret, i;
                  ^
                   = 0
   2 warnings generated.


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

  1336	
  1337	static int do_singlereg_checksum(struct tasdevice_priv *tasdevice,
  1338		enum channel chl, unsigned char book, unsigned char page,
  1339		unsigned char reg, unsigned char val)
  1340	{
  1341		struct tas_crc crc_data;
  1342		unsigned int nData1;
  1343		int ret;
  1344		bool in;
  1345	
  1346		if ((book == TASDEVICE_BOOK_ID(TAS2781_SA_COEFF_SWAP_REG))
  1347			&& (page == TASDEVICE_PAGE_ID(TAS2781_SA_COEFF_SWAP_REG))
  1348			&& (reg >= TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG))
  1349			&& (reg <= (TASDEVICE_PAGE_REG(
  1350			TAS2781_SA_COEFF_SWAP_REG) + 4))) {
  1351			/*DSP swap command, pass */
  1352			ret = 0;
  1353			goto end;
  1354		}
  1355	
  1356		in = check_yram(&crc_data, book, page, reg, 1);
> 1357		if (in) {
  1358			ret = tasdevice_dev_read(tasdevice, chl,
  1359				TASDEVICE_REG(book, page, reg), &nData1);
  1360			if (ret < 0)
  1361				goto end;
  1362	
  1363			if (nData1 != val) {
  1364				dev_err(tasdevice->dev,
  1365					"B[0x%x]P[0x%x]R[0x%x] W[0x%x], R[0x%x]\n",
  1366					book, page, reg,
  1367					val, nData1);
  1368				tasdevice->tasdevice[chl].err_code |=
  1369					ERROR_YRAM_CRCCHK;
  1370				ret = -EAGAIN;
  1371				goto end;
  1372			}
  1373	
  1374			ret = crc8(tasdevice->crc8_lkp_tbl, &val, 1, 0);
  1375		}
  1376	
  1377	end:
  1378		return ret;
  1379	}
  1380	

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

      parent reply	other threads:[~2023-03-25  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 11:07 Shenghao Ding
2023-03-24 17:07 ` Christophe JAILLET
2023-03-24 22:42   ` Mark Brown
2023-03-25  8:16 ` kernel test robot [this message]

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=202303251653.7HZjyxTf-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=llvm@lists.linux.dev \
    --cc=navada@ti.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peeyush@ti.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=shenghao-ding@ti.com \
    --cc=x1077012@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

all inboxes | Powered by JetHome®