[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202302271204.H1QKC6Vv-lkp@intel.com>
Date: Mon, 27 Feb 2023 13:00:26 +0800
From: kernel test robot <lkp@...el.com>
To: KiseokJo <kiseok.jo@...ndevice.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: sound/soc/codecs/sma1303.c:1517:28: sparse: sparse: symbol
'sma_i2c_regmap' was not declared. Should it be static?
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f3a2439f20d918930cc4ae8f76fe1c1afd26958f
commit: 68cd394efd0fdce25d0def8d6cb1b8898b2c13d9 ASoC: The Iron Device SMA1303 is a boosted Class-D audio amplifier.
date: 4 weeks ago
config: sparc-randconfig-s032-20230226 (https://download.01.org/0day-ci/archive/20230227/202302271204.H1QKC6Vv-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=68cd394efd0fdce25d0def8d6cb1b8898b2c13d9
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 68cd394efd0fdce25d0def8d6cb1b8898b2c13d9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash sound/soc/codecs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302271204.H1QKC6Vv-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> sound/soc/codecs/sma1303.c:1517:28: sparse: sparse: symbol 'sma_i2c_regmap' was not declared. Should it be static?
vim +/sma_i2c_regmap +1517 sound/soc/codecs/sma1303.c
1457
1458 static void sma1303_check_fault_worker(struct work_struct *work)
1459 {
1460 struct sma1303_priv *sma1303 =
1461 container_of(work, struct sma1303_priv, check_fault_work.work);
1462 int ret = 0;
1463 unsigned int over_temp, ocp_val, uvlo_val;
1464
1465 if (sma1303->tsdw_cnt)
1466 ret = sma1303_regmap_read(sma1303,
1467 SMA1303_0A_SPK_VOL, &sma1303->cur_vol);
1468 else
1469 ret = sma1303_regmap_read(sma1303,
1470 SMA1303_0A_SPK_VOL, &sma1303->init_vol);
1471
1472 if (ret != 0) {
1473 dev_err(sma1303->dev,
1474 "failed to read SMA1303_0A_SPK_VOL : %d\n", ret);
1475 return;
1476 }
1477
1478 ret = sma1303_regmap_read(sma1303, SMA1303_FA_STATUS1, &over_temp);
1479 if (ret != 0) {
1480 dev_err(sma1303->dev,
1481 "failed to read SMA1303_FA_STATUS1 : %d\n", ret);
1482 return;
1483 }
1484
1485 ret = sma1303_regmap_read(sma1303, SMA1303_FB_STATUS2, &ocp_val);
1486 if (ret != 0) {
1487 dev_err(sma1303->dev,
1488 "failed to read SMA1303_FB_STATUS2 : %d\n", ret);
1489 return;
1490 }
1491
1492 ret = sma1303_regmap_read(sma1303, SMA1303_FF_DEVICE_INDEX, &uvlo_val);
1493 if (ret != 0) {
1494 dev_err(sma1303->dev,
1495 "failed to read SMA1303_FF_DEVICE_INDEX : %d\n", ret);
1496 return;
1497 }
1498
1499 if (~over_temp & SMA1303_OT1_OK_STATUS) {
1500 dev_crit(sma1303->dev,
1501 "%s : OT1(Over Temperature Level 1)\n", __func__);
1502
1503 if ((sma1303->cur_vol + 6) <= 0xFF)
1504 sma1303_regmap_write(sma1303,
1505 SMA1303_0A_SPK_VOL, sma1303->cur_vol + 6);
1506
1507 sma1303->tsdw_cnt++;
1508 } else if (sma1303->tsdw_cnt) {
1509 sma1303_regmap_write(sma1303,
1510 SMA1303_0A_SPK_VOL, sma1303->init_vol);
1511 sma1303->tsdw_cnt = 0;
1512 sma1303->cur_vol = sma1303->init_vol;
1513 }
1514
1515 if (~over_temp & SMA1303_OT2_OK_STATUS) {
1516 dev_crit(sma1303->dev,
> 1517 "%s : OT2(Over Temperature Level 2)\n", __func__);
1518 }
1519 if (ocp_val & SMA1303_OCP_SPK_STATUS) {
1520 dev_crit(sma1303->dev,
1521 "%s : OCP_SPK(Over Current Protect SPK)\n", __func__);
1522 }
1523 if (ocp_val & SMA1303_OCP_BST_STATUS) {
1524 dev_crit(sma1303->dev,
1525 "%s : OCP_BST(Over Current Protect Boost)\n", __func__);
1526 }
1527 if ((ocp_val & SMA1303_CLK_MON_STATUS) && (sma1303->amp_power_status)) {
1528 dev_crit(sma1303->dev,
1529 "%s : CLK_FAULT(No clock input)\n", __func__);
1530 }
1531 if (uvlo_val & SMA1303_UVLO_BST_STATUS) {
1532 dev_crit(sma1303->dev,
1533 "%s : UVLO(Under Voltage Lock Out)\n", __func__);
1534 }
1535
1536 if ((over_temp != sma1303->last_over_temp) ||
1537 (ocp_val != sma1303->last_ocp_val)) {
1538
1539 dev_crit(sma1303->dev, "Please check AMP status");
1540 dev_dbg(sma1303->dev, "STATUS1=0x%02X : STATUS2=0x%02X\n",
1541 over_temp, ocp_val);
1542 sma1303->last_over_temp = over_temp;
1543 sma1303->last_ocp_val = ocp_val;
1544 }
1545
1546 if (sma1303->check_fault_status) {
1547 if (sma1303->check_fault_period > 0)
1548 queue_delayed_work(system_freezable_wq,
1549 &sma1303->check_fault_work,
1550 sma1303->check_fault_period * HZ);
1551 else
1552 queue_delayed_work(system_freezable_wq,
1553 &sma1303->check_fault_work,
1554 CHECK_PERIOD_TIME * HZ);
1555 }
1556
1557 if (!(~over_temp & SMA1303_OT1_OK_STATUS)
1558 && !(~over_temp & SMA1303_OT2_OK_STATUS)
1559 && !(ocp_val & SMA1303_OCP_SPK_STATUS)
1560 && !(ocp_val & SMA1303_OCP_BST_STATUS)
1561 && !(ocp_val & SMA1303_CLK_MON_STATUS)
1562 && !(uvlo_val & SMA1303_UVLO_BST_STATUS)) {
1563 }
1564 }
1565
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists