public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Baojun Xu <baojun.xu@ti.com>, tiwai@suse.de
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	robh+dt@kernel.org, andriy.shevchenko@linux.intel.com,
	lgirdwood@gmail.com, perex@perex.cz,
	pierre-louis.bossart@linux.intel.com, kevin-lu@ti.com,
	shenghao-ding@ti.com, navada@ti.com, 13916275206@139.com,
	v-po@ti.com, niranjan.hy@ti.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, liam.r.girdwood@intel.com,
	yung-chuan.liao@linux.intel.com, baojun.xu@ti.com,
	broonie@kernel.org, soyer@irl.hu
Subject: Re: [PATCH v5 1/1] ALSA: hda/tas2781: Add tas2781 hda driver based on SPI
Date: Mon, 20 May 2024 02:40:28 +0800	[thread overview]
Message-ID: <202405200222.TIIew7S6-lkp@intel.com> (raw)
In-Reply-To: <20240519150433.760-2-baojun.xu@ti.com>

Hi Baojun,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tiwai-sound/for-next]
[also build test WARNING on tiwai-sound/for-linus rafael-pm/linux-next rafael-pm/bleeding-edge linus/master v6.9 next-20240517]
[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/Baojun-Xu/ALSA-hda-tas2781-Add-tas2781-hda-driver-based-on-SPI/20240519-230843
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
patch link:    https://lore.kernel.org/r/20240519150433.760-2-baojun.xu%40ti.com
patch subject: [PATCH v5 1/1] ALSA: hda/tas2781: Add tas2781 hda driver based on SPI
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240520/202405200222.TIIew7S6-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240520/202405200222.TIIew7S6-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405200222.TIIew7S6-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/pci/hda/tas2781_spi_fwlib.c:1225:11: warning: result of comparison of constant 13656 with expression of type 'unsigned char' is always false [-Wtautological-constant-out-of-range-compare]
    1225 |             (reg == TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG)) &&
         |              ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/pci/hda/tas2781_spi_fwlib.c:1281:11: warning: result of comparison of constant 13660 with expression of type 'unsigned char' is always true [-Wtautological-constant-out-of-range-compare]
    1281 |             (reg <= (TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG) + 4)))
         |              ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/pci/hda/tas2781_spi_fwlib.c:1280:11: warning: result of comparison of constant 13656 with expression of type 'unsigned char' is always false [-Wtautological-constant-out-of-range-compare]
    1280 |             (reg >= TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG)) &&
         |              ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/pci/hda/tas2781_spi_fwlib.c:2112:3: warning: variable 'status' is uninitialized when used here [-Wuninitialized]
    2112 |                 status++;
         |                 ^~~~~~
   sound/pci/hda/tas2781_spi_fwlib.c:2050:12: note: initialize the variable 'status' to silence this warning
    2050 |         int status;
         |                   ^
         |                    = 0
   4 warnings generated.


vim +1225 sound/pci/hda/tas2781_spi_fwlib.c

  1206	
  1207	static int tasdev_multibytes_chksum(struct tasdevice_priv *tasdevice,
  1208		unsigned char book, unsigned char page,
  1209		unsigned char reg, unsigned int len)
  1210	{
  1211		struct tas_crc crc_data;
  1212		unsigned char crc_chksum = 0;
  1213		unsigned char nBuf1[128];
  1214		int ret = 0, i;
  1215		bool in;
  1216	
  1217		if ((reg + len - 1) > 127) {
  1218			ret = -EINVAL;
  1219			dev_err(tasdevice->dev, "firmware error\n");
  1220			goto end;
  1221		}
  1222	
  1223		if ((book == TASDEVICE_BOOK_ID(TAS2781_SA_COEFF_SWAP_REG)) &&
  1224		    (page == TASDEVICE_PAGE_ID(TAS2781_SA_COEFF_SWAP_REG)) &&
> 1225		    (reg == TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG)) &&
  1226		    (len == 4)) {
  1227			/* DSP swap command, pass */
  1228			ret = 0;
  1229			goto end;
  1230		}
  1231	
  1232		in = check_yram(&crc_data, book, page, reg, len);
  1233		if (!in)
  1234			goto end;
  1235	
  1236		if (len == 1) {
  1237			dev_err(tasdevice->dev, "firmware error\n");
  1238			ret = -EINVAL;
  1239			goto end;
  1240		}
  1241	
  1242		ret = tasdevice_spi_dev_bulk_read(tasdevice,
  1243			TASDEVICE_REG(book, page, crc_data.offset),
  1244			nBuf1, crc_data.len);
  1245		if (ret < 0)
  1246			goto end;
  1247	
  1248		for (i = 0; i < crc_data.len; i++) {
  1249			if ((book == TASDEVICE_BOOK_ID(TAS2781_SA_COEFF_SWAP_REG)) &&
  1250			    (page == TASDEVICE_PAGE_ID(TAS2781_SA_COEFF_SWAP_REG)) &&
  1251			    ((i + crc_data.offset) >=
  1252				TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG)) &&
  1253			    ((i + crc_data.offset) <=
  1254				(TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG) + 4)))
  1255				/* DSP swap command, bypass */
  1256				continue;
  1257			else
  1258				crc_chksum += crc8(tasdevice->crc8_lkp_tbl, &nBuf1[i],
  1259					1, 0);
  1260		}
  1261	
  1262		ret = crc_chksum;
  1263	
  1264	end:
  1265		return ret;
  1266	}
  1267	
  1268	static int do_singlereg_checksum(struct tasdevice_priv *tasdevice,
  1269		unsigned char book, unsigned char page,
  1270		unsigned char reg, unsigned char val)
  1271	{
  1272		struct tas_crc crc_data;
  1273		unsigned int nData1;
  1274		int ret = 0;
  1275		bool in;
  1276	
  1277		/* DSP swap command, pass */
  1278		if ((book == TASDEVICE_BOOK_ID(TAS2781_SA_COEFF_SWAP_REG)) &&
  1279		    (page == TASDEVICE_PAGE_ID(TAS2781_SA_COEFF_SWAP_REG)) &&
  1280		    (reg >= TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG)) &&
> 1281		    (reg <= (TASDEVICE_PAGE_REG(TAS2781_SA_COEFF_SWAP_REG) + 4)))
  1282			return 0;
  1283	
  1284		in = check_yram(&crc_data, book, page, reg, 1);
  1285		if (!in)
  1286			return 0;
  1287		ret = tasdevice_spi_dev_read(tasdevice,
  1288			TASDEVICE_REG(book, page, reg), &nData1);
  1289		if (ret < 0)
  1290			return ret;
  1291	
  1292		if (nData1 != val) {
  1293			dev_err(tasdevice->dev,
  1294				"B[0x%x]P[0x%x]R[0x%x] W[0x%x], R[0x%x]\n",
  1295				book, page, reg, val, nData1);
  1296			tasdevice->err_code |= ERROR_YRAM_CRCCHK;
  1297			return -EAGAIN;
  1298		}
  1299	
  1300		ret = crc8(tasdevice->crc8_lkp_tbl, &val, 1, 0);
  1301	
  1302		return ret;
  1303	}
  1304	

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

      parent reply	other threads:[~2024-05-19 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19 15:04 [PATCH v5 0/1] Add tas2781 driver for SPI Baojun Xu
2024-05-19 15:04 ` [PATCH v5 1/1] ALSA: hda/tas2781: Add tas2781 hda driver based on SPI Baojun Xu
2024-05-19 17:57   ` kernel test robot
2024-05-19 18:40   ` 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=202405200222.TIIew7S6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=13916275206@139.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=kevin-lu@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=navada@ti.com \
    --cc=niranjan.hy@ti.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=shenghao-ding@ti.com \
    --cc=soyer@irl.hu \
    --cc=tiwai@suse.de \
    --cc=v-po@ti.com \
    --cc=yung-chuan.liao@linux.intel.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