* sound/soc/qcom/sm8250.c:31:22: warning: Value stored to 'codec_dai' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-02-01 1:23 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-02-01 1:23 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 18629 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: 810532e7392e764be5ee1b85603585065fa3e86b ASoC: qcom: sm8250: Add Jack support
date: 4 months ago
:::::: branch date: 2 days ago
:::::: commit date: 4 months ago
config: arm-randconfig-c002-20220122 (https://download.01.org/0day-ci/archive/20220201/202202010950.4YpHGG0k-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7b3d30728816403d1fd73cc5082e9fb761262bce)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=810532e7392e764be5ee1b85603585065fa3e86b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 810532e7392e764be5ee1b85603585065fa3e86b
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
if (rkey != keys[level]) {
^~~~~~~~~~~~~~~~~~~
drivers/md/persistent-data/dm-btree.c:397:4: note: Taking false branch
if (rkey != keys[level]) {
^
drivers/md/persistent-data/dm-btree.c:406:8: note: Assigned value is garbage or undefined
root = le64_to_cpu(internal_value_le);
^
drivers/md/persistent-data/dm-btree.c:1091:3: warning: Value stored to 'node' is never read [clang-analyzer-deadcode.DeadStores]
node = dm_block_data(shadow_current(s));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/md/persistent-data/dm-btree.c:1091:3: note: Value stored to 'node' is never read
node = dm_block_data(shadow_current(s));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/md/persistent-data/dm-btree.c:1155:3: warning: Value stored to 'node' is never read [clang-analyzer-deadcode.DeadStores]
node = dm_block_data(shadow_current(s));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/md/persistent-data/dm-btree.c:1155:3: note: Value stored to 'node' is never read
node = dm_block_data(shadow_current(s));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
drivers/hwspinlock/qcom_hwspinlock.c:158:24: warning: Passed-by-value struct argument contains uninitialized data (e.g., field: 'id_size') [clang-analyzer-core.CallAndMessage]
bank->lock[i].priv = devm_regmap_field_alloc(&pdev->dev,
^
drivers/hwspinlock/qcom_hwspinlock.c:132:2: note: 'field' initialized here
struct reg_field field;
^~~~~~~~~~~~~~~~~~~~~~
drivers/hwspinlock/qcom_hwspinlock.c:140:21: note: Left side of '&&' is false
if (IS_ERR(regmap) && PTR_ERR(regmap) == -ENODEV)
^
drivers/hwspinlock/qcom_hwspinlock.c:143:6: note: Calling 'IS_ERR'
if (IS_ERR(regmap))
^~~~~~~~~~~~~~
include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
return IS_ERR_VALUE((unsigned long)ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwspinlock/qcom_hwspinlock.c:143:6: note: Returning from 'IS_ERR'
if (IS_ERR(regmap))
^~~~~~~~~~~~~~
drivers/hwspinlock/qcom_hwspinlock.c:143:2: note: Taking false branch
if (IS_ERR(regmap))
^
drivers/hwspinlock/qcom_hwspinlock.c:148:6: note: Assuming 'bank' is non-null
if (!bank)
^~~~~
drivers/hwspinlock/qcom_hwspinlock.c:148:2: note: Taking false branch
if (!bank)
^
drivers/hwspinlock/qcom_hwspinlock.c:153:2: note: Loop condition is true. Entering loop body
for (i = 0; i < QCOM_MUTEX_NUM_LOCKS; i++) {
^
drivers/hwspinlock/qcom_hwspinlock.c:158:24: note: Passed-by-value struct argument contains uninitialized data (e.g., field: 'id_size')
bank->lock[i].priv = devm_regmap_field_alloc(&pdev->dev,
^
1 warning generated.
sound/soc/codecs/tas2562.c:69:23: warning: Value stored to 'tas2562' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct tas2562_data *tas2562 =
^~~~~~~
sound/soc/codecs/tas2562.c:69:23: note: Value stored to 'tas2562' during its initialization is never read
struct tas2562_data *tas2562 =
^~~~~~~
1 warning generated.
sound/soc/codecs/tas2770.c:50:23: warning: Value stored to 'tas2770' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct tas2770_priv *tas2770 =
^~~~~~~
sound/soc/codecs/tas2770.c:50:23: note: Value stored to 'tas2770' during its initialization is never read
struct tas2770_priv *tas2770 =
^~~~~~~
2 warnings generated.
block/badblocks.c:68:3: warning: Value stored to 'sectors' is never read [clang-analyzer-deadcode.DeadStores]
sectors = target - s;
^ ~~~~~~~~~~
block/badblocks.c:68:3: note: Value stored to 'sectors' is never read
sectors = target - s;
^ ~~~~~~~~~~
block/badblocks.c:348:3: warning: Value stored to 'sectors' is never read [clang-analyzer-deadcode.DeadStores]
sectors = target - s;
^ ~~~~~~~~~~
block/badblocks.c:348:3: note: Value stored to 'sectors' is never read
sectors = target - s;
^ ~~~~~~~~~~
1 warning generated.
sound/soc/kirkwood/kirkwood-i2s.c:322:2: warning: Value stored to 'value' is never read [clang-analyzer-deadcode.DeadStores]
value = readl(priv->io + KIRKWOOD_RECCTL);
^
sound/soc/kirkwood/kirkwood-i2s.c:322:2: note: Value stored to 'value' is never read
2 warnings generated.
sound/soc/qcom/sdm845.c:76:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:76:4: note: Value stored to 'ret' is never read
ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:79:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:79:4: note: Value stored to 'ret' is never read
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
>> sound/soc/qcom/sm8250.c:31:22: warning: Value stored to 'codec_dai' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
^~~~~~~~~
sound/soc/qcom/sm8250.c:31:22: note: Value stored to 'codec_dai' during its initialization is never read
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
^~~~~~~~~
1 warning generated.
sound/soc/codecs/da7213.c:1427:3: warning: Value stored to 'indiv' is never read [clang-analyzer-deadcode.DeadStores]
indiv = DA7213_PLL_INDIV_9_TO_18_MHZ_VAL;
^
sound/soc/codecs/da7213.c:1427:3: note: Value stored to 'indiv' is never read
1 warning generated.
drivers/input/joystick/adi.c:139:6: warning: Although the value stored to 'z' is used in the enclosing expression, the value is never actually read from 'z' [clang-analyzer-deadcode.DeadStores]
v = z = gameport_read(gameport);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/joystick/adi.c:139:6: note: Although the value stored to 'z' is used in the enclosing expression, the value is never actually read from 'z'
v = z = gameport_read(gameport);
^ ~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
drivers/iio/dac/ad5449.c:61:8: warning: Excessive padding in 'struct ad5449' (39 padding bytes, where 7 is optimal).
Optimal fields order:
data,
spi,
chip_info,
lock,
vref_reg,
dac_cache,
has_sdo,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct ad5449 {
~~~~~~~^~~~~~~~
drivers/iio/dac/ad5449.c:61:8: note: Excessive padding in 'struct ad5449' (39 padding bytes, where 7 is optimal). Optimal fields order: data, spi, chip_info, lock, vref_reg, dac_cache, has_sdo, consider reordering the fields or adding explicit padding members
struct ad5449 {
~~~~~~~^~~~~~~~
1 warning generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
Suppressed 1 warnings (1 with check filters).
2 warnings generated.
fs/ntfs3/file.c:496:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = attr_set_size(ni, ATTR_DATA, NULL, 0, &ni->file.run, new_size,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ntfs3/file.c:496:2: note: Value stored to 'err' is never read
err = attr_set_size(ni, ATTR_DATA, NULL, 0, &ni->file.run, new_size,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ntfs3/file.c:988:3: warning: Value stored to 'frame' is never read [clang-analyzer-deadcode.DeadStores]
frame = pos >> frame_bits;
^ ~~~~~~~~~~~~~~~~~
fs/ntfs3/file.c:988:3: note: Value stored to 'frame' is never read
frame = pos >> frame_bits;
^ ~~~~~~~~~~~~~~~~~
2 warnings generated.
drivers/mtd/nand/spi/gigadevice.c:195:14: warning: The left operand of '&' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
((status2 & STATUS_ECC_MASK) >> 4);
~~~~~~~ ^
drivers/mtd/nand/spi/gigadevice.c:171:2: note: 'status2' declared without an initial value
u8 status2;
^~~~~~~~~~
drivers/mtd/nand/spi/gigadevice.c:176:2: note: Control jumps to 'case 16:' at line 180
switch (status & STATUS_ECC_MASK) {
^
drivers/mtd/nand/spi/gigadevice.c:186:7: note: Assuming 'ret' is 0
if (ret)
^~~
drivers/mtd/nand/spi/gigadevice.c:186:3: note: Taking false branch
if (ret)
^
drivers/mtd/nand/spi/gigadevice.c:195:14: note: The left operand of '&' is a garbage value
((status2 & STATUS_ECC_MASK) >> 4);
~~~~~~~ ^
drivers/mtd/nand/spi/gigadevice.c:235:20: warning: The left operand of '&' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
return ((status2 & STATUS_ECC_MASK) >> 4) + 1;
~~~~~~~ ^
drivers/mtd/nand/spi/gigadevice.c:213:2: note: 'status2' declared without an initial value
u8 status2;
^~~~~~~~~~
drivers/mtd/nand/spi/gigadevice.c:218:2: note: Control jumps to 'case 16:' at line 222
switch (status & STATUS_ECC_MASK) {
^
drivers/mtd/nand/spi/gigadevice.c:228:7: note: Assuming 'ret' is 0
if (ret)
^~~
drivers/mtd/nand/spi/gigadevice.c:228:3: note: Taking false branch
if (ret)
^
drivers/mtd/nand/spi/gigadevice.c:235:20: note: The left operand of '&' is a garbage value
return ((status2 & STATUS_ECC_MASK) >> 4) + 1;
~~~~~~~ ^
1 warning generated.
drivers/mtd/nand/spi/macronix.c:63:9: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
*eccsr &= MACRONIX_ECCSR_MASK;
^
drivers/mtd/nand/spi/macronix.c:71:2: note: 'eccsr' declared without an initial value
u8 eccsr;
^~~~~~~~
drivers/mtd/nand/spi/macronix.c:73:2: note: Control jumps to 'case 16:' at line 80
switch (status & STATUS_ECC_MASK) {
^
drivers/mtd/nand/spi/macronix.c:86:7: note: Calling 'mx35lf1ge4ab_get_eccsr'
if (mx35lf1ge4ab_get_eccsr(spinand, &eccsr))
vim +/codec_dai +31 sound/soc/qcom/sm8250.c
aa2e2785545aab Srinivas Kandagatla 2020-10-26 26
810532e7392e76 Srinivas Kandagatla 2021-10-06 27 static int sm8250_snd_init(struct snd_soc_pcm_runtime *rtd)
810532e7392e76 Srinivas Kandagatla 2021-10-06 28 {
810532e7392e76 Srinivas Kandagatla 2021-10-06 29 struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card);
810532e7392e76 Srinivas Kandagatla 2021-10-06 30 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
810532e7392e76 Srinivas Kandagatla 2021-10-06 @31 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
810532e7392e76 Srinivas Kandagatla 2021-10-06 32 struct snd_soc_card *card = rtd->card;
810532e7392e76 Srinivas Kandagatla 2021-10-06 33 int rval, i;
810532e7392e76 Srinivas Kandagatla 2021-10-06 34
810532e7392e76 Srinivas Kandagatla 2021-10-06 35 if (!data->jack_setup) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 36 struct snd_jack *jack;
810532e7392e76 Srinivas Kandagatla 2021-10-06 37
810532e7392e76 Srinivas Kandagatla 2021-10-06 38 rval = snd_soc_card_jack_new(card, "Headset Jack",
810532e7392e76 Srinivas Kandagatla 2021-10-06 39 SND_JACK_HEADSET | SND_JACK_LINEOUT |
810532e7392e76 Srinivas Kandagatla 2021-10-06 40 SND_JACK_MECHANICAL |
810532e7392e76 Srinivas Kandagatla 2021-10-06 41 SND_JACK_BTN_0 | SND_JACK_BTN_1 |
810532e7392e76 Srinivas Kandagatla 2021-10-06 42 SND_JACK_BTN_2 | SND_JACK_BTN_3 |
810532e7392e76 Srinivas Kandagatla 2021-10-06 43 SND_JACK_BTN_4 | SND_JACK_BTN_5,
810532e7392e76 Srinivas Kandagatla 2021-10-06 44 &data->jack, NULL, 0);
810532e7392e76 Srinivas Kandagatla 2021-10-06 45
810532e7392e76 Srinivas Kandagatla 2021-10-06 46 if (rval < 0) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 47 dev_err(card->dev, "Unable to add Headphone Jack\n");
810532e7392e76 Srinivas Kandagatla 2021-10-06 48 return rval;
810532e7392e76 Srinivas Kandagatla 2021-10-06 49 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 50
810532e7392e76 Srinivas Kandagatla 2021-10-06 51 jack = data->jack.jack;
810532e7392e76 Srinivas Kandagatla 2021-10-06 52
810532e7392e76 Srinivas Kandagatla 2021-10-06 53 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_MEDIA);
810532e7392e76 Srinivas Kandagatla 2021-10-06 54 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
810532e7392e76 Srinivas Kandagatla 2021-10-06 55 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
810532e7392e76 Srinivas Kandagatla 2021-10-06 56 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
810532e7392e76 Srinivas Kandagatla 2021-10-06 57 data->jack_setup = true;
810532e7392e76 Srinivas Kandagatla 2021-10-06 58 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 59
810532e7392e76 Srinivas Kandagatla 2021-10-06 60 switch (cpu_dai->id) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 61 case TX_CODEC_DMA_TX_0:
810532e7392e76 Srinivas Kandagatla 2021-10-06 62 case TX_CODEC_DMA_TX_1:
810532e7392e76 Srinivas Kandagatla 2021-10-06 63 case TX_CODEC_DMA_TX_2:
810532e7392e76 Srinivas Kandagatla 2021-10-06 64 case TX_CODEC_DMA_TX_3:
810532e7392e76 Srinivas Kandagatla 2021-10-06 65 for_each_rtd_codec_dais(rtd, i, codec_dai) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 66 rval = snd_soc_component_set_jack(codec_dai->component,
810532e7392e76 Srinivas Kandagatla 2021-10-06 67 &data->jack, NULL);
810532e7392e76 Srinivas Kandagatla 2021-10-06 68 if (rval != 0 && rval != -ENOTSUPP) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 69 dev_warn(card->dev, "Failed to set jack: %d\n", rval);
810532e7392e76 Srinivas Kandagatla 2021-10-06 70 return rval;
810532e7392e76 Srinivas Kandagatla 2021-10-06 71 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 72 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 73
810532e7392e76 Srinivas Kandagatla 2021-10-06 74 break;
810532e7392e76 Srinivas Kandagatla 2021-10-06 75 default:
810532e7392e76 Srinivas Kandagatla 2021-10-06 76 break;
810532e7392e76 Srinivas Kandagatla 2021-10-06 77 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 78
810532e7392e76 Srinivas Kandagatla 2021-10-06 79
810532e7392e76 Srinivas Kandagatla 2021-10-06 80 return 0;
810532e7392e76 Srinivas Kandagatla 2021-10-06 81 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 82
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* sound/soc/qcom/sm8250.c:31:22: warning: Value stored to 'codec_dai' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-04-17 16:49 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-04-17 16:49 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 17934 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a2c29ccd9477861b16ddc02c411a6c9665250558
commit: 810532e7392e764be5ee1b85603585065fa3e86b ASoC: qcom: sm8250: Add Jack support
date: 6 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 6 months ago
config: arm-randconfig-c002-20220417 (https://download.01.org/0day-ci/archive/20220418/202204180031.zTWeKofA-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 64c045e25b8471bbb572bd29159c294a82a86a25)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=810532e7392e764be5ee1b85603585065fa3e86b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 810532e7392e764be5ee1b85603585065fa3e86b
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
include/linux/platform_device.h:243:2: note: Returning from 'dev_set_drvdata'
dev_set_drvdata(&pdev->dev, data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:244:1: note: Returning without writing to 'data->lock_release'
}
^
sound/soc/img/img-spdif-in.c:731:2: note: Returning from 'platform_set_drvdata'
platform_set_drvdata(pdev, spdif);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:736:2: note: Taking false branch
if (IS_ERR(base))
^
sound/soc/img/img-spdif-in.c:742:2: note: Taking false branch
if (IS_ERR(spdif->clk_sys)) {
^
sound/soc/img/img-spdif-in.c:749:2: note: Taking false branch
if (!pm_runtime_enabled(&pdev->dev)) {
^
sound/soc/img/img-spdif-in.c:755:6: note: Assuming 'ret' is >= 0
if (ret < 0) {
^~~~~~~
sound/soc/img/img-spdif-in.c:755:2: note: Taking false branch
if (ret < 0) {
^
sound/soc/img/img-spdif-in.c:761:2: note: Taking false branch
if (IS_ERR(rst)) {
^
sound/soc/img/img-spdif-in.c:775:2: note: Loop condition is false. Exiting loop
spin_lock_init(&spdif->lock);
^
include/linux/spinlock.h:353:34: note: expanded from macro 'spin_lock_init'
# define spin_lock_init(_lock) \
^
sound/soc/img/img-spdif-in.c:782:2: note: The value -128 is assigned to field 'lock_release'
spdif->lock_release = -128;
^~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:786:30: note: The result of the left shift is undefined because the left operand is negative
reg |= (spdif->lock_release << IMG_SPDIF_IN_CTL_LOCKLO_SHIFT) &
~~~~~~~~~~~~~~~~~~~ ^
1 warning generated.
Suppressed 1 warnings (1 with check filters).
2 warnings generated.
sound/soc/ti/davinci-i2s.c:407:11: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
srgr |= DAVINCI_MCBSP_SRGR_FWID(mcbsp_word_length *
^
sound/soc/ti/davinci-i2s.c:87:41: note: expanded from macro 'DAVINCI_MCBSP_SRGR_FWID'
#define DAVINCI_MCBSP_SRGR_FWID(v) ((v) << 8)
~~~ ^
sound/soc/ti/davinci-i2s.c:390:6: note: Assuming field 'stream' is not equal to SNDRV_PCM_STREAM_CAPTURE
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/ti/davinci-i2s.c:390:2: note: Taking false branch
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
^
sound/soc/ti/davinci-i2s.c:402:2: note: Control jumps to 'case 16384:' at line 403
switch (master) {
^
sound/soc/ti/davinci-i2s.c:407:11: note: The result of the left shift is undefined because the left operand is negative
srgr |= DAVINCI_MCBSP_SRGR_FWID(mcbsp_word_length *
^
sound/soc/ti/davinci-i2s.c:87:41: note: expanded from macro 'DAVINCI_MCBSP_SRGR_FWID'
#define DAVINCI_MCBSP_SRGR_FWID(v) ((v) << 8)
~~~ ^
sound/soc/ti/davinci-i2s.c:432:11: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
srgr |= DAVINCI_MCBSP_SRGR_FWID(mcbsp_word_length * 8 - 1);
^
sound/soc/ti/davinci-i2s.c:87:41: note: expanded from macro 'DAVINCI_MCBSP_SRGR_FWID'
#define DAVINCI_MCBSP_SRGR_FWID(v) ((v) << 8)
~~~ ^
sound/soc/ti/davinci-i2s.c:390:6: note: Assuming field 'stream' is not equal to SNDRV_PCM_STREAM_CAPTURE
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/ti/davinci-i2s.c:390:2: note: Taking false branch
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
^
sound/soc/ti/davinci-i2s.c:402:2: note: Control jumps to 'case 12288:' at line 429
switch (master) {
^
sound/soc/ti/davinci-i2s.c:432:11: note: The result of the left shift is undefined because the left operand is negative
srgr |= DAVINCI_MCBSP_SRGR_FWID(mcbsp_word_length * 8 - 1);
^
sound/soc/ti/davinci-i2s.c:87:41: note: expanded from macro 'DAVINCI_MCBSP_SRGR_FWID'
#define DAVINCI_MCBSP_SRGR_FWID(v) ((v) << 8)
~~~ ^
1 warning generated.
Suppressed 1 warnings (1 with check filters).
2 warnings generated.
sound/soc/qcom/sdm845.c:76:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:76:4: note: Value stored to 'ret' is never read
ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:79:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:79:4: note: Value stored to 'ret' is never read
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
>> sound/soc/qcom/sm8250.c:31:22: warning: Value stored to 'codec_dai' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
^~~~~~~~~
sound/soc/qcom/sm8250.c:31:22: note: Value stored to 'codec_dai' during its initialization is never read
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
^~~~~~~~~
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
drivers/mtd/nand/raw/nand_bbt.c:579:3: warning: Value stored to 'bbtblocks' is never read [clang-analyzer-deadcode.DeadStores]
bbtblocks = mtd->size >> this->bbt_erase_shift;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_bbt.c:579:3: note: Value stored to 'bbtblocks' is never read
bbtblocks = mtd->size >> this->bbt_erase_shift;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
Suppressed 2 warnings (1 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
drivers/crypto/caam/ctrl.c:388:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
val = rd_reg32(&r4tst->rtmctl);
^ ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/crypto/caam/ctrl.c:388:2: note: Value stored to 'val' is never read
val = rd_reg32(&r4tst->rtmctl);
^ ~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 3 warnings (2 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (2 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (2 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
sound/soc/codecs/tas2770.c:50:23: warning: Value stored to 'tas2770' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct tas2770_priv *tas2770 =
^~~~~~~
sound/soc/codecs/tas2770.c:50:23: note: Value stored to 'tas2770' during its initialization is never read
struct tas2770_priv *tas2770 =
^~~~~~~
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
net/core/bpf_sk_storage.c:754:4: warning: Value stored to 'b' is never read [clang-analyzer-deadcode.DeadStores]
b = &smap->buckets[bucket_id++];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/bpf_sk_storage.c:754:4: note: Value stored to 'b' is never read
b = &smap->buckets[bucket_id++];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
drivers/iio/gyro/adxrs450.c:73:8: warning: Excessive padding in 'struct adxrs450_state' (36 padding bytes, where 4 is optimal).
Optimal fields order:
tx,
us,
rx,
buf_lock,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct adxrs450_state {
~~~~~~~^~~~~~~~~~~~~~~~
drivers/iio/gyro/adxrs450.c:73:8: note: Excessive padding in 'struct adxrs450_state' (36 padding bytes, where 4 is optimal). Optimal fields order: tx, us, rx, buf_lock, consider reordering the fields or adding explicit padding members
struct adxrs450_state {
~~~~~~~^~~~~~~~~~~~~~~~
1 warning generated.
drivers/iio/gyro/itg3200_core.c:94:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = itg3200_read_reg_s16(indio_dev, reg, val);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/gyro/itg3200_core.c:94:3: note: Value stored to 'ret' is never read
ret = itg3200_read_reg_s16(indio_dev, reg, val);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
drivers/iio/frequency/ad9523.c:266:8: warning: Excessive padding in 'struct ad9523_state' (34 padding bytes, where 2 is optimal).
Optimal fields order:
data,
spi,
reg,
pdata,
pwrdown_gpio,
reset_gpio,
sync_gpio,
vcxo_freq,
vco_freq,
vco_out_freq,
lock,
ad9523_channels,
vco_out_map,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct ad9523_state {
vim +/codec_dai +31 sound/soc/qcom/sm8250.c
aa2e2785545aab2 Srinivas Kandagatla 2020-10-26 26
810532e7392e764 Srinivas Kandagatla 2021-10-06 27 static int sm8250_snd_init(struct snd_soc_pcm_runtime *rtd)
810532e7392e764 Srinivas Kandagatla 2021-10-06 28 {
810532e7392e764 Srinivas Kandagatla 2021-10-06 29 struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card);
810532e7392e764 Srinivas Kandagatla 2021-10-06 30 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
810532e7392e764 Srinivas Kandagatla 2021-10-06 @31 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
810532e7392e764 Srinivas Kandagatla 2021-10-06 32 struct snd_soc_card *card = rtd->card;
810532e7392e764 Srinivas Kandagatla 2021-10-06 33 int rval, i;
810532e7392e764 Srinivas Kandagatla 2021-10-06 34
810532e7392e764 Srinivas Kandagatla 2021-10-06 35 if (!data->jack_setup) {
810532e7392e764 Srinivas Kandagatla 2021-10-06 36 struct snd_jack *jack;
810532e7392e764 Srinivas Kandagatla 2021-10-06 37
810532e7392e764 Srinivas Kandagatla 2021-10-06 38 rval = snd_soc_card_jack_new(card, "Headset Jack",
810532e7392e764 Srinivas Kandagatla 2021-10-06 39 SND_JACK_HEADSET | SND_JACK_LINEOUT |
810532e7392e764 Srinivas Kandagatla 2021-10-06 40 SND_JACK_MECHANICAL |
810532e7392e764 Srinivas Kandagatla 2021-10-06 41 SND_JACK_BTN_0 | SND_JACK_BTN_1 |
810532e7392e764 Srinivas Kandagatla 2021-10-06 42 SND_JACK_BTN_2 | SND_JACK_BTN_3 |
810532e7392e764 Srinivas Kandagatla 2021-10-06 43 SND_JACK_BTN_4 | SND_JACK_BTN_5,
810532e7392e764 Srinivas Kandagatla 2021-10-06 44 &data->jack, NULL, 0);
810532e7392e764 Srinivas Kandagatla 2021-10-06 45
810532e7392e764 Srinivas Kandagatla 2021-10-06 46 if (rval < 0) {
810532e7392e764 Srinivas Kandagatla 2021-10-06 47 dev_err(card->dev, "Unable to add Headphone Jack\n");
810532e7392e764 Srinivas Kandagatla 2021-10-06 48 return rval;
810532e7392e764 Srinivas Kandagatla 2021-10-06 49 }
810532e7392e764 Srinivas Kandagatla 2021-10-06 50
810532e7392e764 Srinivas Kandagatla 2021-10-06 51 jack = data->jack.jack;
810532e7392e764 Srinivas Kandagatla 2021-10-06 52
810532e7392e764 Srinivas Kandagatla 2021-10-06 53 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_MEDIA);
810532e7392e764 Srinivas Kandagatla 2021-10-06 54 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
810532e7392e764 Srinivas Kandagatla 2021-10-06 55 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
810532e7392e764 Srinivas Kandagatla 2021-10-06 56 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
810532e7392e764 Srinivas Kandagatla 2021-10-06 57 data->jack_setup = true;
810532e7392e764 Srinivas Kandagatla 2021-10-06 58 }
810532e7392e764 Srinivas Kandagatla 2021-10-06 59
810532e7392e764 Srinivas Kandagatla 2021-10-06 60 switch (cpu_dai->id) {
810532e7392e764 Srinivas Kandagatla 2021-10-06 61 case TX_CODEC_DMA_TX_0:
810532e7392e764 Srinivas Kandagatla 2021-10-06 62 case TX_CODEC_DMA_TX_1:
810532e7392e764 Srinivas Kandagatla 2021-10-06 63 case TX_CODEC_DMA_TX_2:
810532e7392e764 Srinivas Kandagatla 2021-10-06 64 case TX_CODEC_DMA_TX_3:
810532e7392e764 Srinivas Kandagatla 2021-10-06 65 for_each_rtd_codec_dais(rtd, i, codec_dai) {
810532e7392e764 Srinivas Kandagatla 2021-10-06 66 rval = snd_soc_component_set_jack(codec_dai->component,
810532e7392e764 Srinivas Kandagatla 2021-10-06 67 &data->jack, NULL);
810532e7392e764 Srinivas Kandagatla 2021-10-06 68 if (rval != 0 && rval != -ENOTSUPP) {
810532e7392e764 Srinivas Kandagatla 2021-10-06 69 dev_warn(card->dev, "Failed to set jack: %d\n", rval);
810532e7392e764 Srinivas Kandagatla 2021-10-06 70 return rval;
810532e7392e764 Srinivas Kandagatla 2021-10-06 71 }
810532e7392e764 Srinivas Kandagatla 2021-10-06 72 }
810532e7392e764 Srinivas Kandagatla 2021-10-06 73
810532e7392e764 Srinivas Kandagatla 2021-10-06 74 break;
810532e7392e764 Srinivas Kandagatla 2021-10-06 75 default:
810532e7392e764 Srinivas Kandagatla 2021-10-06 76 break;
810532e7392e764 Srinivas Kandagatla 2021-10-06 77 }
810532e7392e764 Srinivas Kandagatla 2021-10-06 78
810532e7392e764 Srinivas Kandagatla 2021-10-06 79
810532e7392e764 Srinivas Kandagatla 2021-10-06 80 return 0;
810532e7392e764 Srinivas Kandagatla 2021-10-06 81 }
810532e7392e764 Srinivas Kandagatla 2021-10-06 82
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* sound/soc/qcom/sm8250.c:31:22: warning: Value stored to 'codec_dai' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-02-01 22:03 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-02-01 22:03 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 20462 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: 810532e7392e764be5ee1b85603585065fa3e86b ASoC: qcom: sm8250: Add Jack support
date: 4 months ago
:::::: branch date: 2 days ago
:::::: commit date: 4 months ago
config: arm-randconfig-c002-20220131 (https://download.01.org/0day-ci/archive/20220202/202202020529.KFMha7KE-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6b1e844b69f15bb7dffaf9365cd2b355d2eb7579)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=810532e7392e764be5ee1b85603585065fa3e86b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 810532e7392e764be5ee1b85603585065fa3e86b
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
Suppressed 9 warnings (8 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
Suppressed 9 warnings (8 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
Suppressed 9 warnings (8 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
Suppressed 9 warnings (8 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
sound/soc/qcom/sdm845.c:76:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:76:4: note: Value stored to 'ret' is never read
ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:79:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/sdm845.c:79:4: note: Value stored to 'ret' is never read
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
>> sound/soc/qcom/sm8250.c:31:22: warning: Value stored to 'codec_dai' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
^~~~~~~~~
sound/soc/qcom/sm8250.c:31:22: note: Value stored to 'codec_dai' during its initialization is never read
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
^~~~~~~~~
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
sound/soc/sunxi/sun8i-codec.c:553:28: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
(lrck_div_order - 4) << SUN8I_AIF_CLK_CTRL_LRCK_DIV);
~~~~~~~~~~~~~~~~~~~~ ^
sound/soc/sunxi/sun8i-codec.c:498:23: note: '?' condition is true
unsigned int slots = aif->slots ?: params_channels(params);
^
sound/soc/sunxi/sun8i-codec.c:499:28: note: '?' condition is true
unsigned int slot_width = aif->slot_width ?: params_width(params);
^
sound/soc/sunxi/sun8i-codec.c:505:2: note: Control jumps to 'case 24:' at line 515
switch (params_width(params)) {
^
sound/soc/sunxi/sun8i-codec.c:517:3: note: Execution continues on line 522
break;
^
sound/soc/sunxi/sun8i-codec.c:528:6: note: 'lrck_div_order' is >= 0
if (lrck_div_order < 0)
^~~~~~~~~~~~~~
sound/soc/sunxi/sun8i-codec.c:528:2: note: Taking false branch
if (lrck_div_order < 0)
^
sound/soc/sunxi/sun8i-codec.c:531:6: note: Assuming field 'id' is not equal to SUN8I_CODEC_AIF2
if (dai->id == SUN8I_CODEC_AIF2 || dai->id == SUN8I_CODEC_AIF3) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/sunxi/sun8i-codec.c:531:6: note: Left side of '||' is false
sound/soc/sunxi/sun8i-codec.c:531:37: note: Assuming field 'id' is not equal to SUN8I_CODEC_AIF3
if (dai->id == SUN8I_CODEC_AIF2 || dai->id == SUN8I_CODEC_AIF3) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/sunxi/sun8i-codec.c:531:2: note: Taking false branch
if (dai->id == SUN8I_CODEC_AIF2 || dai->id == SUN8I_CODEC_AIF3) {
^
sound/soc/sunxi/sun8i-codec.c:553:28: note: The result of the left shift is undefined because the left operand is negative
(lrck_div_order - 4) << SUN8I_AIF_CLK_CTRL_LRCK_DIV);
~~~~~~~~~~~~~~~~~~~~ ^
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
sound/soc/codecs/rt715-sdca.c:358:25: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'int' [clang-analyzer-core.UndefinedBinaryOperatorResult]
unsigned int mask = (1 << fls(max)) - 1;
^ ~~~~~~~~
sound/soc/codecs/rt715-sdca.c:358:28: note: Calling 'fls'
unsigned int mask = (1 << fls(max)) - 1;
^~~~~~~~
include/asm-generic/bitops/fls.h:15:2: note: 'r' initialized to 32
int r = 32;
^~~~~
include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is not equal to 0, which participates in a condition later
if (!x)
^~
include/asm-generic/bitops/fls.h:17:2: note: Taking false branch
if (!x)
^
include/asm-generic/bitops/fls.h:19:6: note: Assuming the condition is false
vim +/codec_dai +31 sound/soc/qcom/sm8250.c
aa2e2785545aab Srinivas Kandagatla 2020-10-26 26
810532e7392e76 Srinivas Kandagatla 2021-10-06 27 static int sm8250_snd_init(struct snd_soc_pcm_runtime *rtd)
810532e7392e76 Srinivas Kandagatla 2021-10-06 28 {
810532e7392e76 Srinivas Kandagatla 2021-10-06 29 struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card);
810532e7392e76 Srinivas Kandagatla 2021-10-06 30 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
810532e7392e76 Srinivas Kandagatla 2021-10-06 @31 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
810532e7392e76 Srinivas Kandagatla 2021-10-06 32 struct snd_soc_card *card = rtd->card;
810532e7392e76 Srinivas Kandagatla 2021-10-06 33 int rval, i;
810532e7392e76 Srinivas Kandagatla 2021-10-06 34
810532e7392e76 Srinivas Kandagatla 2021-10-06 35 if (!data->jack_setup) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 36 struct snd_jack *jack;
810532e7392e76 Srinivas Kandagatla 2021-10-06 37
810532e7392e76 Srinivas Kandagatla 2021-10-06 38 rval = snd_soc_card_jack_new(card, "Headset Jack",
810532e7392e76 Srinivas Kandagatla 2021-10-06 39 SND_JACK_HEADSET | SND_JACK_LINEOUT |
810532e7392e76 Srinivas Kandagatla 2021-10-06 40 SND_JACK_MECHANICAL |
810532e7392e76 Srinivas Kandagatla 2021-10-06 41 SND_JACK_BTN_0 | SND_JACK_BTN_1 |
810532e7392e76 Srinivas Kandagatla 2021-10-06 42 SND_JACK_BTN_2 | SND_JACK_BTN_3 |
810532e7392e76 Srinivas Kandagatla 2021-10-06 43 SND_JACK_BTN_4 | SND_JACK_BTN_5,
810532e7392e76 Srinivas Kandagatla 2021-10-06 44 &data->jack, NULL, 0);
810532e7392e76 Srinivas Kandagatla 2021-10-06 45
810532e7392e76 Srinivas Kandagatla 2021-10-06 46 if (rval < 0) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 47 dev_err(card->dev, "Unable to add Headphone Jack\n");
810532e7392e76 Srinivas Kandagatla 2021-10-06 48 return rval;
810532e7392e76 Srinivas Kandagatla 2021-10-06 49 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 50
810532e7392e76 Srinivas Kandagatla 2021-10-06 51 jack = data->jack.jack;
810532e7392e76 Srinivas Kandagatla 2021-10-06 52
810532e7392e76 Srinivas Kandagatla 2021-10-06 53 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_MEDIA);
810532e7392e76 Srinivas Kandagatla 2021-10-06 54 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
810532e7392e76 Srinivas Kandagatla 2021-10-06 55 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
810532e7392e76 Srinivas Kandagatla 2021-10-06 56 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
810532e7392e76 Srinivas Kandagatla 2021-10-06 57 data->jack_setup = true;
810532e7392e76 Srinivas Kandagatla 2021-10-06 58 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 59
810532e7392e76 Srinivas Kandagatla 2021-10-06 60 switch (cpu_dai->id) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 61 case TX_CODEC_DMA_TX_0:
810532e7392e76 Srinivas Kandagatla 2021-10-06 62 case TX_CODEC_DMA_TX_1:
810532e7392e76 Srinivas Kandagatla 2021-10-06 63 case TX_CODEC_DMA_TX_2:
810532e7392e76 Srinivas Kandagatla 2021-10-06 64 case TX_CODEC_DMA_TX_3:
810532e7392e76 Srinivas Kandagatla 2021-10-06 65 for_each_rtd_codec_dais(rtd, i, codec_dai) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 66 rval = snd_soc_component_set_jack(codec_dai->component,
810532e7392e76 Srinivas Kandagatla 2021-10-06 67 &data->jack, NULL);
810532e7392e76 Srinivas Kandagatla 2021-10-06 68 if (rval != 0 && rval != -ENOTSUPP) {
810532e7392e76 Srinivas Kandagatla 2021-10-06 69 dev_warn(card->dev, "Failed to set jack: %d\n", rval);
810532e7392e76 Srinivas Kandagatla 2021-10-06 70 return rval;
810532e7392e76 Srinivas Kandagatla 2021-10-06 71 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 72 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 73
810532e7392e76 Srinivas Kandagatla 2021-10-06 74 break;
810532e7392e76 Srinivas Kandagatla 2021-10-06 75 default:
810532e7392e76 Srinivas Kandagatla 2021-10-06 76 break;
810532e7392e76 Srinivas Kandagatla 2021-10-06 77 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 78
810532e7392e76 Srinivas Kandagatla 2021-10-06 79
810532e7392e76 Srinivas Kandagatla 2021-10-06 80 return 0;
810532e7392e76 Srinivas Kandagatla 2021-10-06 81 }
810532e7392e76 Srinivas Kandagatla 2021-10-06 82
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-17 16:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 1:23 sound/soc/qcom/sm8250.c:31:22: warning: Value stored to 'codec_dai' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2022-02-01 22:03 kernel test robot
2022-04-17 16:49 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.