Re: [PATCH v2] ASoC: tas2783-sdw: add firmware download status check

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
:::::: 
:::::: Manual check reason: "linux-review patch is more than 7 days old, verify it wasn't already superseded"
:::::: 

BCC: [email protected]
CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Baojun Xu <[email protected]>
TO: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

Hi Baojun,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on linus/master next-20260820]
[cannot apply to v7.2]
[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/ASoC-tas2783-sdw-add-firmware-download-status-check/20260813-101450
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20260813021450.1897-1-baojun.xu%40ti.com
patch subject: [PATCH v2] ASoC: tas2783-sdw: add firmware download status check
:::::: branch date: 18 hours ago
:::::: commit date: 18 hours ago
config: i386-randconfig-r061-20260821 (https://download.01.org/0day-ci/archive/20260821/[email protected]/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260821/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/tas2783-sdw.c:1238:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    1238 |         if (val == 0x20) {
         |             ^~~~~~~~~~~
   sound/soc/codecs/tas2783-sdw.c:1253:7: note: uninitialized use occurs here
    1253 |         if (!ret) {
         |              ^~~
   sound/soc/codecs/tas2783-sdw.c:1238:2: note: remove the 'if' if its condition is always true
    1238 |         if (val == 0x20) {
         |         ^~~~~~~~~~~~~~~~
   sound/soc/codecs/tas2783-sdw.c:1231:9: note: initialize the variable 'ret' to silence this warning
    1231 |         s32 ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +1238 sound/soc/codecs/tas2783-sdw.c

e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1226  
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1227  static s32 tas_io_init(struct device *dev, struct sdw_slave *slave)
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1228  {
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1229  	struct tas2783_prv *tas_dev = dev_get_drvdata(dev);
2af7676ead60e3a Baojun Xu           2026-08-13  1230  	unsigned int val;
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1231  	s32 ret;
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1232  
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1233  	if (tas_dev->hw_init)
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1234  		return 0;
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1235  
2af7676ead60e3a Baojun Xu           2026-08-13  1236  	regmap_read(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 7), &val);
2af7676ead60e3a Baojun Xu           2026-08-13  1237  	/* Check if the AMP is in reset status. */
2af7676ead60e3a Baojun Xu           2026-08-13 @1238  	if (val == 0x20) {
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1239  		tas_dev->fw_dl_success = false;
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1240  
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1241  		ret = regmap_write(tas_dev->regmap, TAS2783_SW_RESET, 0x1);
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1242  		if (ret) {
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1243  			dev_err(dev, "sw reset failed, err=%d", ret);
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1244  			return ret;
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1245  		}
2af7676ead60e3a Baojun Xu           2026-08-13  1246  		fsleep(2200);
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1247  
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1248  		tas_dev->fw_use_fallback = false;
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1249  		ret = tas_fw_load(tas_dev, slave);
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1250  		if (!ret && tas_dev->fw_use_fallback)
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1251  			ret = tas_fw_load(tas_dev, slave);
2af7676ead60e3a Baojun Xu           2026-08-13  1252  	}
e26bb459d0f3dad Bartosz Juraszewski 2026-06-22  1253  	if (!ret) {
ca8f3611dcf8548 Niranjan H Y        2025-12-15  1254  		if (tas_dev->sa_func_data)
ca8f3611dcf8548 Niranjan H Y        2025-12-15  1255  			ret = sdca_regmap_write_init(dev, tas_dev->regmap,
ca8f3611dcf8548 Niranjan H Y        2025-12-15  1256  						     tas_dev->sa_func_data);
ca8f3611dcf8548 Niranjan H Y        2025-12-15  1257  		else
4cc9bd8d7b32d59 Niranjan H Y        2025-09-12  1258  			ret = regmap_multi_reg_write(tas_dev->regmap, tas2783_init_seq,
4cc9bd8d7b32d59 Niranjan H Y        2025-09-12  1259  						     ARRAY_SIZE(tas2783_init_seq));
2af7676ead60e3a Baojun Xu           2026-08-13  1260  		/* Re-active AMP after resume. */
2af7676ead60e3a Baojun Xu           2026-08-13  1261  		regmap_write(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 2), 0);
ca8f3611dcf8548 Niranjan H Y        2025-12-15  1262  		if (ret)
ca8f3611dcf8548 Niranjan H Y        2025-12-15  1263  			dev_err(tas_dev->dev,
ca8f3611dcf8548 Niranjan H Y        2025-12-15  1264  				"init writes failed, err=%d", ret);
ca8f3611dcf8548 Niranjan H Y        2025-12-15  1265  		else
4cc9bd8d7b32d59 Niranjan H Y        2025-09-12  1266  			tas_dev->hw_init = true;
4cc9bd8d7b32d59 Niranjan H Y        2025-09-12  1267  	}
4cc9bd8d7b32d59 Niranjan H Y        2025-09-12  1268  
4cc9bd8d7b32d59 Niranjan H Y        2025-09-12  1269  	return ret;
4cc9bd8d7b32d59 Niranjan H Y        2025-09-12  1270  }
4cc9bd8d7b32d59 Niranjan H Y        2025-09-12  1271  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.