* sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-12-22 20:02 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-12-22 20:02 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 31092 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Trevor Wu <trevor.wu@mediatek.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2f47a9a4dfa3674fad19a49b40c5103a9a8e1589
commit: 6746cc858259985a945a07075a19ec4d24352407 ASoC: mediatek: mt8195: add platform driver
date: 4 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 4 months ago
config: riscv-randconfig-c006-20211220 (https://download.01.org/0day-ci/archive/20211223/202112230355.6AMe4n1J-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 555eacf75f21cd1dfc6363d73ad187b730349543)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6746cc858259985a945a07075a19ec4d24352407
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6746cc858259985a945a07075a19ec4d24352407
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 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/compiler_types.h:308:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
drivers/rpmsg/qcom_smd.c:799:2: note: Loop condition is false. Exiting loop
SET_TX_CHANNEL_FLAG(channel, fHEAD, 1);
^
drivers/rpmsg/qcom_smd.c:327:3: note: expanded from macro 'SET_TX_CHANNEL_FLAG'
BUILD_BUG_ON(sizeof(channel->info->tx.param) != sizeof(u8)); \
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:328:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:306:2: note: expanded from macro '__compiletime_assert'
do { \
^
drivers/rpmsg/qcom_smd.c:799:2: note: Field 'info_word' is non-null
SET_TX_CHANNEL_FLAG(channel, fHEAD, 1);
^
drivers/rpmsg/qcom_smd.c:328:16: note: expanded from macro 'SET_TX_CHANNEL_FLAG'
if (channel->info_word) \
^
drivers/rpmsg/qcom_smd.c:799:2: note: Taking true branch
SET_TX_CHANNEL_FLAG(channel, fHEAD, 1);
^
drivers/rpmsg/qcom_smd.c:328:3: note: expanded from macro 'SET_TX_CHANNEL_FLAG'
if (channel->info_word) \
^
drivers/rpmsg/qcom_smd.c:809:2: note: Undefined or garbage value returned to caller
return ret;
^ ~~~
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.
5 warnings generated.
sound/soc/codecs/lpass-tx-macro.c:771:4: warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
snd_soc_component_write_field(component, mic_sel_reg,
^ ~~~~~~~~~~~
sound/soc/codecs/lpass-tx-macro.c:736:2: note: 'mic_sel_reg' declared without an initial value
u16 mic_sel_reg;
^~~~~~~~~~~~~~~
sound/soc/codecs/lpass-tx-macro.c:742:2: note: 'Default' branch taken. Execution continues on line 769
switch (e->reg) {
^
sound/soc/codecs/lpass-tx-macro.c:769:6: note: Assuming 'val' is not equal to 0
if (val != 0) {
^~~~~~~~
sound/soc/codecs/lpass-tx-macro.c:769:2: note: Taking true branch
if (val != 0) {
^
sound/soc/codecs/lpass-tx-macro.c:770:7: note: Assuming 'val' is < 5
if (val < 5) {
^~~~~~~
sound/soc/codecs/lpass-tx-macro.c:770:3: note: Taking true branch
if (val < 5) {
^
sound/soc/codecs/lpass-tx-macro.c:771:4: note: 2nd function call argument is an uninitialized value
snd_soc_component_write_field(component, mic_sel_reg,
^ ~~~~~~~~~~~
sound/soc/codecs/lpass-tx-macro.c:774:4: warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
snd_soc_component_write_field(component, mic_sel_reg,
^ ~~~~~~~~~~~
sound/soc/codecs/lpass-tx-macro.c:736:2: note: 'mic_sel_reg' declared without an initial value
u16 mic_sel_reg;
^~~~~~~~~~~~~~~
sound/soc/codecs/lpass-tx-macro.c:742:2: note: 'Default' branch taken. Execution continues on line 769
switch (e->reg) {
^
sound/soc/codecs/lpass-tx-macro.c:769:6: note: Assuming 'val' is not equal to 0
if (val != 0) {
^~~~~~~~
sound/soc/codecs/lpass-tx-macro.c:769:2: note: Taking true branch
if (val != 0) {
^
sound/soc/codecs/lpass-tx-macro.c:770:7: note: Assuming 'val' is >= 5
if (val < 5) {
^~~~~~~
sound/soc/codecs/lpass-tx-macro.c:770:3: note: Taking false branch
if (val < 5) {
^
sound/soc/codecs/lpass-tx-macro.c:774:4: note: 2nd function call argument is an uninitialized value
snd_soc_component_write_field(component, mic_sel_reg,
^ ~~~~~~~~~~~
Suppressed 3 warnings (3 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.
4 warnings generated.
>> sound/soc/mediatek/common/mtk-afe-fe-dai.c:126:29: warning: Value stored to 'memif' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe_memif *memif = &afe->memif[id];
^~~~~ ~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:126:29: note: Value stored to 'memif' during its initialization is never read
struct mtk_base_afe_memif *memif = &afe->memif[id];
^~~~~ ~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:364:6: warning: Array access (via field 'reg_back_up') results in a null pointer dereference [clang-analyzer-core.NullDereference]
afe->reg_back_up[i]);
^ ~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:6: note: Calling 'pm_runtime_status_suspended'
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pm_runtime.h:261:70: note: Returning zero, which participates in a condition later
static inline bool pm_runtime_status_suspended(struct device *dev) { return false; }
^~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:6: note: Returning from 'pm_runtime_status_suspended'
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:6: note: Left side of '||' is false
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:42: note: Assuming field 'suspended' is true
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:2: note: Taking false branch
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:359:6: note: Assuming field 'reg_back_up' is null
if (!afe->reg_back_up)
^~~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:359:2: note: Taking true branch
if (!afe->reg_back_up)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:360:3: note: Taking false branch
dev_dbg(dev, "%s no reg_backup\n", __func__);
^
include/linux/dev_printk.h:130:2: note: expanded from macro 'dev_dbg'
if (0) \
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:362:14: note: Assuming 'i' is < field 'reg_back_up_list_num'
for (i = 0; i < afe->reg_back_up_list_num; i++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:362:2: note: Loop condition is true. Entering loop body
for (i = 0; i < afe->reg_back_up_list_num; i++)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:364:6: note: Array access (via field 'reg_back_up') results in a null pointer dereference
afe->reg_back_up[i]);
^ ~~~~~~~~~~~
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.
3 warnings generated.
Suppressed 3 warnings (3 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.
3 warnings generated.
Suppressed 3 warnings (3 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.
3 warnings generated.
Suppressed 3 warnings (3 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.
3 warnings generated.
Suppressed 3 warnings (3 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.
3 warnings generated.
Suppressed 3 warnings (3 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.
3 warnings generated.
sound/pci/lola/lola.c:675:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(card->mixername, card->shortname);
^~~~~~
sound/pci/lola/lola.c:675:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(card->mixername, card->shortname);
^~~~~~
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.
4 warnings generated.
sound/pci/lola/lola_mixer.c:480:15: warning: Division by zero [clang-analyzer-core.DivideZero]
int src = i % chip->mixer.src_phys_ins;
^
sound/pci/lola/lola_mixer.c:834:6: note: Assuming 'err' is >= 0
if (err < 0)
^~~~~~~
sound/pci/lola/lola_mixer.c:834:2: note: Taking false branch
if (err < 0)
^
sound/pci/lola/lola_mixer.c:836:8: note: Calling 'create_analog_mixer'
err = create_analog_mixer(chip, CAPT, "Analog Capture Volume");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/pci/lola/lola_mixer.c:583:6: note: Assuming field 'num_pins' is 0
if (!chip->pin[dir].num_pins)
^~~~~~~~~~~~~~~~~~~~~~~~
sound/pci/lola/lola_mixer.c:583:2: note: Taking true branch
if (!chip->pin[dir].num_pins)
^
sound/pci/lola/lola_mixer.c:584:3: note: Returning without writing to 'chip->mixer.src_phys_ins'
return 0;
^
sound/pci/lola/lola_mixer.c:836:8: note: Returning from 'create_analog_mixer'
--
drivers/usb/host/xhci-ring.c:1021:6: note: Assuming the condition is true
if (unlikely(TRB_TO_SUSPEND_PORT(le32_to_cpu(trb->generic.field[3])))) {
^
include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^~~~
drivers/usb/host/xhci-ring.c:1021:2: note: Taking false branch
if (unlikely(TRB_TO_SUSPEND_PORT(le32_to_cpu(trb->generic.field[3])))) {
^
drivers/usb/host/xhci-ring.c:1030:6: note: Assuming 'ep' is non-null
if (!ep)
^~~
drivers/usb/host/xhci-ring.c:1030:2: note: Taking false branch
if (!ep)
^
drivers/usb/host/xhci-ring.c:1037:6: note: Assuming 'comp_code' is equal to COMP_CONTEXT_STATE_ERROR
if (comp_code == COMP_CONTEXT_STATE_ERROR) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-ring.c:1037:2: note: Taking true branch
if (comp_code == COMP_CONTEXT_STATE_ERROR) {
^
drivers/usb/host/xhci-ring.c:1052:3: note: Control jumps to 'case 1:' at line 1070
switch (GET_EP_CTX_STATE(ep_ctx)) {
^
drivers/usb/host/xhci-ring.c:1072:4: note: Value assigned to 'command'
command = xhci_alloc_command(xhci, false, GFP_ATOMIC);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-ring.c:1073:8: note: Assuming pointer value is null
if (!command)
^~~~~~~~
drivers/usb/host/xhci-ring.c:1073:8: note: Assuming 'command' is null
if (!command)
^~~~~~~~
drivers/usb/host/xhci-ring.c:1073:4: note: Taking true branch
if (!command)
^
drivers/usb/host/xhci-ring.c:1078:35: note: Passing null pointer value via 2nd parameter 'cmd'
xhci_queue_stop_endpoint(xhci, command, slot_id, ep_index, 0);
^~~~~~~
drivers/usb/host/xhci-ring.c:1078:4: note: Calling 'xhci_queue_stop_endpoint'
xhci_queue_stop_endpoint(xhci, command, slot_id, ep_index, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-ring.c:4355:29: note: Passing null pointer value via 2nd parameter 'cmd'
return queue_command(xhci, cmd, 0, 0, 0,
^~~
drivers/usb/host/xhci-ring.c:4355:9: note: Calling 'queue_command'
return queue_command(xhci, cmd, 0, 0, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-ring.c:4255:7: note: Assuming the condition is false
if ((xhci->xhc_state & XHCI_STATE_DYING) ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-ring.c:4255:6: note: Left side of '||' is false
if ((xhci->xhc_state & XHCI_STATE_DYING) ||
^
drivers/usb/host/xhci-ring.c:4256:4: note: Assuming the condition is false
(xhci->xhc_state & XHCI_STATE_HALTED)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-ring.c:4255:2: note: Taking false branch
if ((xhci->xhc_state & XHCI_STATE_DYING) ||
^
drivers/usb/host/xhci-ring.c:4261:7: note: 'command_must_succeed' is false
if (!command_must_succeed)
^~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-ring.c:4261:2: note: Taking true branch
if (!command_must_succeed)
^
drivers/usb/host/xhci-ring.c:4266:6: note: Assuming 'ret' is >= 0
if (ret < 0) {
^~~~~~~
drivers/usb/host/xhci-ring.c:4266:2: note: Taking false branch
if (ret < 0) {
^
drivers/usb/host/xhci-ring.c:4274:19: note: Access to field 'command_trb' results in a dereference of a null pointer (loaded from variable 'cmd')
cmd->command_trb = xhci->cmd_ring->enqueue;
~~~ ^
Suppressed 7 warnings (7 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.
3 warnings generated.
sound/soc/mediatek/mt8195/mt8195-audsys-clk.c:17:8: warning: Excessive padding in 'struct afe_gate' (14 padding bytes, where 6 is optimal).
Optimal fields order:
name,
parent_name,
ops,
flags,
id,
reg,
bit,
cg_flags,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct afe_gate {
~~~~~~~^~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-audsys-clk.c:17:8: note: Excessive padding in 'struct afe_gate' (14 padding bytes, where 6 is optimal). Optimal fields order: name, parent_name, ops, flags, id, reg, bit, cg_flags, consider reordering the fields or adding explicit padding members
struct afe_gate {
~~~~~~~^~~~~~~~~~
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.
6 warnings generated.
>> sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:345:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:345:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 4 warnings (3 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.
>> sound/soc/mediatek/mt8195/mt8195-dai-adda.c:218:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-dai-adda.c:218:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 3 warnings (3 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.
4 warnings generated.
drivers/iio/accel/bmc150-accel-core.c:144:8: warning: Excessive padding in 'struct bmc150_accel_chip_info' (11 padding bytes, where 3 is optimal).
Optimal fields order:
name,
channels,
num_channels,
scale_table,
chip_id,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct bmc150_accel_chip_info {
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/accel/bmc150-accel-core.c:144:8: note: Excessive padding in 'struct bmc150_accel_chip_info' (11 padding bytes, where 3 is optimal). Optimal fields order: name, channels, num_channels, scale_table, chip_id, consider reordering the fields or adding explicit padding members
struct bmc150_accel_chip_info {
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
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.
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.
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.
3 warnings generated.
Suppressed 3 warnings (3 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.
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.
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.
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.
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.
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.
lib/vsprintf.c:398:20: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
buf[idx + width] = tmp[len - idx - 1];
^ ~~~~~~~~~~~~~~~~~~
lib/vsprintf.c:379:6: note: Assuming 'num' is > 9
if (num <= 9) {
^~~~~~~~
lib/vsprintf.c:379:2: note: Taking false branch
vim +/afe +208 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
6746cc858259985 Trevor Wu 2021-08-19 204
6746cc858259985 Trevor Wu 2021-08-19 205 static const struct mt8195_afe_channel_merge*
6746cc858259985 Trevor Wu 2021-08-19 206 mt8195_afe_found_cm(struct snd_soc_dai *dai)
6746cc858259985 Trevor Wu 2021-08-19 207 {
6746cc858259985 Trevor Wu 2021-08-19 @208 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
6746cc858259985 Trevor Wu 2021-08-19 209 int id = -EINVAL;
6746cc858259985 Trevor Wu 2021-08-19 210
6746cc858259985 Trevor Wu 2021-08-19 211 if (mt8195_afe_memif_is_ul(dai->id) == 0)
6746cc858259985 Trevor Wu 2021-08-19 212 return NULL;
6746cc858259985 Trevor Wu 2021-08-19 213
6746cc858259985 Trevor Wu 2021-08-19 214 switch (dai->id) {
6746cc858259985 Trevor Wu 2021-08-19 215 case MT8195_AFE_MEMIF_UL9:
6746cc858259985 Trevor Wu 2021-08-19 216 id = MT8195_AFE_CM0;
6746cc858259985 Trevor Wu 2021-08-19 217 break;
6746cc858259985 Trevor Wu 2021-08-19 218 case MT8195_AFE_MEMIF_UL2:
6746cc858259985 Trevor Wu 2021-08-19 219 id = MT8195_AFE_CM1;
6746cc858259985 Trevor Wu 2021-08-19 220 break;
6746cc858259985 Trevor Wu 2021-08-19 221 case MT8195_AFE_MEMIF_UL10:
6746cc858259985 Trevor Wu 2021-08-19 222 id = MT8195_AFE_CM2;
6746cc858259985 Trevor Wu 2021-08-19 223 break;
6746cc858259985 Trevor Wu 2021-08-19 224 default:
6746cc858259985 Trevor Wu 2021-08-19 225 break;
6746cc858259985 Trevor Wu 2021-08-19 226 }
6746cc858259985 Trevor Wu 2021-08-19 227
6746cc858259985 Trevor Wu 2021-08-19 228 if (id < 0) {
6746cc858259985 Trevor Wu 2021-08-19 229 dev_dbg(afe->dev, "%s, memif %d cannot find CM!\n",
6746cc858259985 Trevor Wu 2021-08-19 230 __func__, dai->id);
6746cc858259985 Trevor Wu 2021-08-19 231 return NULL;
6746cc858259985 Trevor Wu 2021-08-19 232 }
6746cc858259985 Trevor Wu 2021-08-19 233
6746cc858259985 Trevor Wu 2021-08-19 234 return &mt8195_afe_cm[id];
6746cc858259985 Trevor Wu 2021-08-19 235 }
6746cc858259985 Trevor Wu 2021-08-19 236
---
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/mediatek/mt8195/mt8195-afe-pcm.c:208:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-04-10 4:16 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-04-10 4:16 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 30484 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: Trevor Wu <trevor.wu@mediatek.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e1f700ebd6bea293abe3c7e2807b252018efde01
commit: 6746cc858259985a945a07075a19ec4d24352407 ASoC: mediatek: mt8195: add platform driver
date: 8 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 8 months ago
config: riscv-randconfig-c006-20220405 (https://download.01.org/0day-ci/archive/20220410/202204101256.W3CJRYrS-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c4a1b07d0979e7ff20d7d541af666d822d66b566)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6746cc858259985a945a07075a19ec4d24352407
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6746cc858259985a945a07075a19ec4d24352407
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 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 (ncp_div > 128 || dac_rate / ncp_div > 2048000) {
~~~~~~~~~^~~~~~~~~
sound/soc/codecs/pcm512x.c:911:6: note: Assuming field 'bclk_ratio' is > 0
if (pcm512x->bclk_ratio > 0) {
^~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/pcm512x.c:911:2: note: Taking true branch
if (pcm512x->bclk_ratio > 0) {
^
sound/soc/codecs/pcm512x.c:922:6: note: Assuming field 'pll_out' is 0
if (!pcm512x->pll_out) {
^~~~~~~~~~~~~~~~~
sound/soc/codecs/pcm512x.c:922:2: note: Taking true branch
if (!pcm512x->pll_out) {
^
sound/soc/codecs/pcm512x.c:925:14: note: Left side of '||' is true
bclk_div = DIV_ROUND_CLOSEST(sck_rate, bclk_rate);
^
include/linux/math.h:89:23: note: expanded from macro 'DIV_ROUND_CLOSEST'
(((typeof(x))-1) > 0 || \
^
sound/soc/codecs/pcm512x.c:991:6: note: Assuming 'bclk_div' is <= 128
if (bclk_div > 128) {
^~~~~~~~~~~~~~
sound/soc/codecs/pcm512x.c:991:2: note: Taking false branch
if (bclk_div > 128) {
^
sound/soc/codecs/pcm512x.c:1001:12: note: Assuming the condition is false
dsp_div = mck_rate > pcm512x_dsp_max(pcm512x) ? 2 : 1;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/pcm512x.c:1001:12: note: '?' condition is false
sound/soc/codecs/pcm512x.c:1004:6: note: Assuming 'dac_rate' is not equal to 0
if (dac_rate) {
^~~~~~~~
sound/soc/codecs/pcm512x.c:1004:2: note: Taking true branch
if (dac_rate) {
^
sound/soc/codecs/pcm512x.c:1010:3: note: Taking false branch
dev_dbg(dev, "using pll input as dac input\n");
^
include/linux/dev_printk.h:130:2: note: expanded from macro 'dev_dbg'
if (0) \
^
sound/soc/codecs/pcm512x.c:1013:7: note: Assuming 'ret' is equal to 0
if (ret != 0) {
^~~~~~~~
sound/soc/codecs/pcm512x.c:1013:3: note: Taking false branch
if (ret != 0) {
^
sound/soc/codecs/pcm512x.c:1022:7: note: Assuming 'ret' is equal to 0
if (ret != 0) {
^~~~~~~~
sound/soc/codecs/pcm512x.c:1022:3: note: Taking false branch
if (ret != 0) {
^
sound/soc/codecs/pcm512x.c:1060:12: note: Left side of '||' is true
osr_div = DIV_ROUND_CLOSEST(dac_rate, osr_rate);
^
include/linux/math.h:89:23: note: expanded from macro 'DIV_ROUND_CLOSEST'
(((typeof(x))-1) > 0 || \
^
sound/soc/codecs/pcm512x.c:1061:6: note: Assuming 'osr_div' is <= 128
if (osr_div > 128) {
^~~~~~~~~~~~~
sound/soc/codecs/pcm512x.c:1061:2: note: Taking false branch
if (osr_div > 128) {
^
sound/soc/codecs/pcm512x.c:1066:12: note: Left side of '||' is true
dac_div = DIV_ROUND_CLOSEST(dacsrc_rate, dac_rate);
^
include/linux/math.h:89:23: note: expanded from macro 'DIV_ROUND_CLOSEST'
(((typeof(x))-1) > 0 || \
^
sound/soc/codecs/pcm512x.c:1067:6: note: Assuming 'dac_div' is <= 128
if (dac_div > 128) {
^~~~~~~~~~~~~
sound/soc/codecs/pcm512x.c:1067:2: note: Taking false branch
if (dac_div > 128) {
^
sound/soc/codecs/pcm512x.c:1073:12: note: Left side of '||' is true
ncp_div = DIV_ROUND_CLOSEST(dac_rate,
^
include/linux/math.h:89:23: note: expanded from macro 'DIV_ROUND_CLOSEST'
(((typeof(x))-1) > 0 || \
^
sound/soc/codecs/pcm512x.c:1073:2: note: The value 0 is assigned to 'ncp_div'
ncp_div = DIV_ROUND_CLOSEST(dac_rate,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/pcm512x.c:1075:6: note: 'ncp_div' is <= 128
if (ncp_div > 128 || dac_rate / ncp_div > 2048000) {
^~~~~~~
sound/soc/codecs/pcm512x.c:1075:6: note: Left side of '||' is false
sound/soc/codecs/pcm512x.c:1075:32: note: Division by zero
if (ncp_div > 128 || dac_rate / ncp_div > 2048000) {
~~~~~~~~~^~~~~~~~~
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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.
11 warnings generated.
>> sound/soc/mediatek/common/mtk-afe-fe-dai.c:126:29: warning: Value stored to 'memif' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe_memif *memif = &afe->memif[id];
^~~~~ ~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:126:29: note: Value stored to 'memif' during its initialization is never read
struct mtk_base_afe_memif *memif = &afe->memif[id];
^~~~~ ~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:364:6: warning: Array access (via field 'reg_back_up') results in a null pointer dereference [clang-analyzer-core.NullDereference]
afe->reg_back_up[i]);
^ ~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:6: note: Left side of '||' is false
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:42: note: Assuming field 'suspended' is true
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:2: note: Taking false branch
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:359:6: note: Assuming field 'reg_back_up' is null
if (!afe->reg_back_up)
^~~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:359:2: note: Taking true branch
if (!afe->reg_back_up)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:360:3: note: Taking false branch
dev_dbg(dev, "%s no reg_backup\n", __func__);
^
include/linux/dev_printk.h:130:2: note: expanded from macro 'dev_dbg'
if (0) \
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:362:14: note: Assuming 'i' is < field 'reg_back_up_list_num'
for (i = 0; i < afe->reg_back_up_list_num; i++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:362:2: note: Loop condition is true. Entering loop body
for (i = 0; i < afe->reg_back_up_list_num; i++)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:364:6: note: Array access (via field 'reg_back_up') results in a null pointer dereference
afe->reg_back_up[i]);
^ ~~~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
drivers/hwmon/adm1031.c:245:6: warning: Value stored to 'range' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
int range = val - AUTO_TEMP_MIN_FROM_REG(reg);
^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/adm1031.c:245:6: note: Value stored to 'range' during its initialization is never read
int range = val - AUTO_TEMP_MIN_FROM_REG(reg);
^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (2 in non-user code, 8 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
--
fs/btrfs/file.c:3234:4: note: Value stored to 'ret' is never read
ret = 0;
^ ~
fs/btrfs/file.c:3240:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = 0;
^ ~
fs/btrfs/file.c:3240:4: note: Value stored to 'ret' is never read
ret = 0;
^ ~
fs/btrfs/file.c:3251:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = 0;
^ ~
fs/btrfs/file.c:3251:4: note: Value stored to 'ret' is never read
ret = 0;
^ ~
fs/btrfs/file.c:3258:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = 0;
^ ~
fs/btrfs/file.c:3258:4: note: Value stored to 'ret' is never read
ret = 0;
^ ~
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
sound/soc/codecs/wm8903.c:434:3: warning: Value stored to 'best' is never read [clang-analyzer-deadcode.DeadStores]
best = 0;
^ ~
sound/soc/codecs/wm8903.c:434:3: note: Value stored to 'best' is never read
best = 0;
^ ~
Suppressed 10 warnings (3 in non-user code, 7 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.
11 warnings generated.
sound/soc/codecs/wm8996.c:1562:3: warning: Value stored to 'bclk_rate' is never read [clang-analyzer-deadcode.DeadStores]
bclk_rate = wm8996->sysclk / bclk_divs[best];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/wm8996.c:1562:3: note: Value stored to 'bclk_rate' is never read
bclk_rate = wm8996->sysclk / bclk_divs[best];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 10 warnings (3 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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.
10 warnings generated.
sound/soc/mediatek/mt8195/mt8195-audsys-clk.c:17:8: warning: Excessive padding in 'struct afe_gate' (14 padding bytes, where 6 is optimal).
Optimal fields order:
name,
parent_name,
ops,
flags,
id,
reg,
bit,
cg_flags,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct afe_gate {
~~~~~~~^~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-audsys-clk.c:17:8: note: Excessive padding in 'struct afe_gate' (14 padding bytes, where 6 is optimal). Optimal fields order: name, parent_name, ops, flags, id, reg, bit, cg_flags, consider reordering the fields or adding explicit padding members
struct afe_gate {
~~~~~~~^~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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.
13 warnings generated.
>> sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:345:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:345:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 11 warnings (3 in non-user code, 8 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.
11 warnings generated.
>> sound/soc/mediatek/mt8195/mt8195-dai-adda.c:218:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-dai-adda.c:218:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
13 warnings generated.
fs/btrfs/file-item.c:715:2: warning: Value stored to 'this_sum_bytes' is never read [clang-analyzer-deadcode.DeadStores]
this_sum_bytes = 0;
^ ~
fs/btrfs/file-item.c:715:2: note: Value stored to 'this_sum_bytes' is never read
this_sum_bytes = 0;
^ ~
fs/btrfs/file-item.c:912:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = 0;
^ ~
fs/btrfs/file-item.c:912:4: note: Value stored to 'ret' is never read
ret = 0;
^ ~
include/linux/list.h:135:13: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
__list_del(entry->prev, entry->next);
^
fs/btrfs/file-item.c:512:9: note: Assuming the condition is false
ASSERT(IS_ALIGNED(start, fs_info->sectorsize) &&
^
include/linux/align.h:13:28: note: expanded from macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
fs/btrfs/ctree.h:3439:29: note: expanded from macro 'ASSERT'
#define ASSERT(expr) (void)(expr)
^~~~
fs/btrfs/file-item.c:512:48: note: Left side of '&&' is false
ASSERT(IS_ALIGNED(start, fs_info->sectorsize) &&
^
fs/btrfs/file-item.c:516:6: note: Assuming 'path' is non-null
if (!path)
^~~~~
fs/btrfs/file-item.c:516:2: note: Taking false branch
if (!path)
^
fs/btrfs/file-item.c:519:6: note: Assuming 'search_commit' is 0
if (search_commit) {
^~~~~~~~~~~~~
fs/btrfs/file-item.c:519:2: note: Taking false branch
if (search_commit) {
^
fs/btrfs/file-item.c:530:6: note: Assuming 'ret' is >= 0
if (ret < 0)
^~~~~~~
fs/btrfs/file-item.c:530:2: note: Taking false branch
if (ret < 0)
^
fs/btrfs/file-item.c:532:6: note: Assuming 'ret' is <= 0
if (ret > 0 && path->slots[0] > 0) {
^~~~~~~
fs/btrfs/file-item.c:532:14: note: Left side of '&&' is false
if (ret > 0 && path->slots[0] > 0) {
^
fs/btrfs/file-item.c:544:9: note: Assuming 'start' is <= 'end'
while (start <= end) {
^~~~~~~~~~~~
fs/btrfs/file-item.c:544:2: note: Loop condition is true. Entering loop body
while (start <= end) {
^
fs/btrfs/file-item.c:546:7: note: Assuming the condition is false
if (path->slots[0] >= btrfs_header_nritems(leaf)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/file-item.c:546:3: note: Taking false branch
if (path->slots[0] >= btrfs_header_nritems(leaf)) {
^
fs/btrfs/file-item.c:556:7: note: Assuming the condition is false
if (key.objectid != BTRFS_EXTENT_CSUM_OBJECTID ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/file-item.c:556:7: note: Left side of '||' is false
fs/btrfs/file-item.c:557:7: note: Assuming field 'type' is equal to BTRFS_EXTENT_CSUM_KEY
key.type != BTRFS_EXTENT_CSUM_KEY ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/file-item.c:556:7: note: Left side of '||' is false
if (key.objectid != BTRFS_EXTENT_CSUM_OBJECTID ||
^
fs/btrfs/file-item.c:558:7: note: Assuming 'end' is >= field 'offset'
key.offset > end)
^~~~~~~~~~~~~~~~
fs/btrfs/file-item.c:556:3: note: Taking false branch
if (key.objectid != BTRFS_EXTENT_CSUM_OBJECTID ||
^
fs/btrfs/file-item.c:561:7: note: Assuming 'start' is >= field 'offset'
if (key.offset > start)
^~~~~~~~~~~~~~~~~~
fs/btrfs/file-item.c:561:3: note: Taking false branch
vim +/afe +208 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
6746cc85825998 Trevor Wu 2021-08-19 204
6746cc85825998 Trevor Wu 2021-08-19 205 static const struct mt8195_afe_channel_merge*
6746cc85825998 Trevor Wu 2021-08-19 206 mt8195_afe_found_cm(struct snd_soc_dai *dai)
6746cc85825998 Trevor Wu 2021-08-19 207 {
6746cc85825998 Trevor Wu 2021-08-19 @208 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
6746cc85825998 Trevor Wu 2021-08-19 209 int id = -EINVAL;
6746cc85825998 Trevor Wu 2021-08-19 210
6746cc85825998 Trevor Wu 2021-08-19 211 if (mt8195_afe_memif_is_ul(dai->id) == 0)
6746cc85825998 Trevor Wu 2021-08-19 212 return NULL;
6746cc85825998 Trevor Wu 2021-08-19 213
6746cc85825998 Trevor Wu 2021-08-19 214 switch (dai->id) {
6746cc85825998 Trevor Wu 2021-08-19 215 case MT8195_AFE_MEMIF_UL9:
6746cc85825998 Trevor Wu 2021-08-19 216 id = MT8195_AFE_CM0;
6746cc85825998 Trevor Wu 2021-08-19 217 break;
6746cc85825998 Trevor Wu 2021-08-19 218 case MT8195_AFE_MEMIF_UL2:
6746cc85825998 Trevor Wu 2021-08-19 219 id = MT8195_AFE_CM1;
6746cc85825998 Trevor Wu 2021-08-19 220 break;
6746cc85825998 Trevor Wu 2021-08-19 221 case MT8195_AFE_MEMIF_UL10:
6746cc85825998 Trevor Wu 2021-08-19 222 id = MT8195_AFE_CM2;
6746cc85825998 Trevor Wu 2021-08-19 223 break;
6746cc85825998 Trevor Wu 2021-08-19 224 default:
6746cc85825998 Trevor Wu 2021-08-19 225 break;
6746cc85825998 Trevor Wu 2021-08-19 226 }
6746cc85825998 Trevor Wu 2021-08-19 227
6746cc85825998 Trevor Wu 2021-08-19 228 if (id < 0) {
6746cc85825998 Trevor Wu 2021-08-19 229 dev_dbg(afe->dev, "%s, memif %d cannot find CM!\n",
6746cc85825998 Trevor Wu 2021-08-19 230 __func__, dai->id);
6746cc85825998 Trevor Wu 2021-08-19 231 return NULL;
6746cc85825998 Trevor Wu 2021-08-19 232 }
6746cc85825998 Trevor Wu 2021-08-19 233
6746cc85825998 Trevor Wu 2021-08-19 234 return &mt8195_afe_cm[id];
6746cc85825998 Trevor Wu 2021-08-19 235 }
6746cc85825998 Trevor Wu 2021-08-19 236
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-04-09 6:33 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-04-09 6:33 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 35401 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: Trevor Wu <trevor.wu@mediatek.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6c7376da23587738ab0e84b8b90b6cc02db5181e
commit: 6746cc858259985a945a07075a19ec4d24352407 ASoC: mediatek: mt8195: add platform driver
date: 8 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 8 months ago
config: riscv-randconfig-c006-20220405 (https://download.01.org/0day-ci/archive/20220409/202204091437.0IjYZuYK-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c4a1b07d0979e7ff20d7d541af666d822d66b566)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6746cc858259985a945a07075a19ec4d24352407
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6746cc858259985a945a07075a19ec4d24352407
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 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/sound/pcm_params.h:315:2: note: Returning the value 93
return (__force snd_pcm_format_t)snd_mask_min(hw_param_mask_c(p,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:47: note: Returning from 'params_format'
data->params.formats = 1ULL << (__force int) params_format(params);
^~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:30: note: The result of the left shift is undefined due to shifting by '93', which is greater or equal to the width of type 'unsigned long long'
data->params.formats = 1ULL << (__force int) params_format(params);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:30: warning: The result of the left shift is undefined due to shifting by '94', which is greater or equal to the width of type 'unsigned long long' [clang-analyzer-core.UndefinedBinaryOperatorResult]
data->params.formats = 1ULL << (__force int) params_format(params);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:47: note: Calling 'params_format'
data->params.formats = 1ULL << (__force int) params_format(params);
^~~~~~~~~~~~~~~~~~~~~
include/sound/pcm_params.h:315:35: note: Calling 'snd_mask_min'
return (__force snd_pcm_format_t)snd_mask_min(hw_param_mask_c(p,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/sound/pcm_params.h:48:2: note: Loop condition is true. Entering loop body
for (i = 0; i < SNDRV_MASK_SIZE; i++) {
^
include/sound/pcm_params.h:49:7: note: Assuming the condition is false
if (mask->bits[i])
^~~~~~~~~~~~~
include/sound/pcm_params.h:49:3: note: Taking false branch
if (mask->bits[i])
^
include/sound/pcm_params.h:48:2: note: Loop condition is true. Entering loop body
for (i = 0; i < SNDRV_MASK_SIZE; i++) {
^
include/sound/pcm_params.h:49:7: note: Assuming the condition is true
if (mask->bits[i])
^~~~~~~~~~~~~
include/sound/pcm_params.h:49:3: note: Taking true branch
if (mask->bits[i])
^
include/sound/pcm_params.h:50:4: note: Returning the value 94
return __ffs(mask->bits[i]) + (i << 5);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/sound/pcm_params.h:315:35: note: Returning from 'snd_mask_min'
return (__force snd_pcm_format_t)snd_mask_min(hw_param_mask_c(p,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/sound/pcm_params.h:315:2: note: Returning the value 94
return (__force snd_pcm_format_t)snd_mask_min(hw_param_mask_c(p,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:47: note: Returning from 'params_format'
data->params.formats = 1ULL << (__force int) params_format(params);
^~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:30: note: The result of the left shift is undefined due to shifting by '94', which is greater or equal to the width of type 'unsigned long long'
data->params.formats = 1ULL << (__force int) params_format(params);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:30: warning: The result of the left shift is undefined due to shifting by '95', which is greater or equal to the width of type 'unsigned long long' [clang-analyzer-core.UndefinedBinaryOperatorResult]
data->params.formats = 1ULL << (__force int) params_format(params);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:47: note: Calling 'params_format'
data->params.formats = 1ULL << (__force int) params_format(params);
^~~~~~~~~~~~~~~~~~~~~
include/sound/pcm_params.h:315:35: note: Calling 'snd_mask_min'
return (__force snd_pcm_format_t)snd_mask_min(hw_param_mask_c(p,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/sound/pcm_params.h:48:2: note: Loop condition is true. Entering loop body
for (i = 0; i < SNDRV_MASK_SIZE; i++) {
^
include/sound/pcm_params.h:49:7: note: Assuming the condition is false
if (mask->bits[i])
^~~~~~~~~~~~~
include/sound/pcm_params.h:49:3: note: Taking false branch
if (mask->bits[i])
^
include/sound/pcm_params.h:48:2: note: Loop condition is true. Entering loop body
for (i = 0; i < SNDRV_MASK_SIZE; i++) {
^
include/sound/pcm_params.h:49:7: note: Assuming the condition is true
if (mask->bits[i])
^~~~~~~~~~~~~
include/sound/pcm_params.h:49:3: note: Taking true branch
if (mask->bits[i])
^
include/sound/pcm_params.h:50:4: note: Returning the value 95
return __ffs(mask->bits[i]) + (i << 5);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/sound/pcm_params.h:315:35: note: Returning from 'snd_mask_min'
return (__force snd_pcm_format_t)snd_mask_min(hw_param_mask_c(p,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/sound/pcm_params.h:315:2: note: Returning the value 95
return (__force snd_pcm_format_t)snd_mask_min(hw_param_mask_c(p,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:47: note: Returning from 'params_format'
data->params.formats = 1ULL << (__force int) params_format(params);
^~~~~~~~~~~~~~~~~~~~~
sound/soc/meson/meson-codec-glue.c:77:30: note: The result of the left shift is undefined due to shifting by '95', which is greater or equal to the width of type 'unsigned long long'
data->params.formats = 1ULL << (__force int) params_format(params);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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.
11 warnings generated.
>> sound/soc/mediatek/common/mtk-afe-fe-dai.c:126:29: warning: Value stored to 'memif' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe_memif *memif = &afe->memif[id];
^~~~~ ~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:126:29: note: Value stored to 'memif' during its initialization is never read
struct mtk_base_afe_memif *memif = &afe->memif[id];
^~~~~ ~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:364:6: warning: Array access (via field 'reg_back_up') results in a null pointer dereference [clang-analyzer-core.NullDereference]
afe->reg_back_up[i]);
^ ~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:6: note: Calling 'pm_runtime_status_suspended'
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pm_runtime.h:261:70: note: Returning zero, which participates in a condition later
static inline bool pm_runtime_status_suspended(struct device *dev) { return false; }
^~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:6: note: Returning from 'pm_runtime_status_suspended'
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:6: note: Left side of '||' is false
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:42: note: Assuming field 'suspended' is true
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:354:2: note: Taking false branch
if (pm_runtime_status_suspended(dev) || !afe->suspended)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:359:6: note: Assuming field 'reg_back_up' is null
if (!afe->reg_back_up)
^~~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:359:2: note: Taking true branch
if (!afe->reg_back_up)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:360:3: note: Taking false branch
dev_dbg(dev, "%s no reg_backup\n", __func__);
^
include/linux/dev_printk.h:130:2: note: expanded from macro 'dev_dbg'
if (0) \
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:362:14: note: Assuming 'i' is < field 'reg_back_up_list_num'
for (i = 0; i < afe->reg_back_up_list_num; i++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/common/mtk-afe-fe-dai.c:362:2: note: Loop condition is true. Entering loop body
for (i = 0; i < afe->reg_back_up_list_num; i++)
^
sound/soc/mediatek/common/mtk-afe-fe-dai.c:364:6: note: Array access (via field 'reg_back_up') results in a null pointer dereference
afe->reg_back_up[i]);
^ ~~~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
sound/soc/bcm/bcm63xx-pcm-whistler.c:281:31: warning: The left operand of '+' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
prtd->dma_addr_next = val_1 + val_2;
~~~~~ ^
sound/soc/bcm/bcm63xx-pcm-whistler.c:252:59: note: 'val_1' declared without an initial value
unsigned int availdepth, ifflevel, offlevel, int_status, val_1, val_2;
^~~~~
sound/soc/bcm/bcm63xx-pcm-whistler.c:267:6: note: Assuming the condition is true
if (int_status & I2S_RX_DESC_OFF_INTR_EN_MSK) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/bcm/bcm63xx-pcm-whistler.c:267:2: note: Taking true branch
if (int_status & I2S_RX_DESC_OFF_INTR_EN_MSK) {
^
sound/soc/bcm/bcm63xx-pcm-whistler.c:276:3: note: Loop condition is false. Execution continues on line 281
while (offlevel) {
^
sound/soc/bcm/bcm63xx-pcm-whistler.c:281:31: note: The left operand of '+' is a garbage value
prtd->dma_addr_next = val_1 + val_2;
~~~~~ ^
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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.
10 warnings generated.
sound/soc/fsl/fsl_sai.c:63:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &sai->pdev->dev;
^~~ ~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_sai.c:63:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = &sai->pdev->dev;
^~~ ~~~~~~~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 with check filters).
--
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
9 warnings generated.
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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.
10 warnings generated.
sound/soc/mediatek/mt8195/mt8195-audsys-clk.c:17:8: warning: Excessive padding in 'struct afe_gate' (14 padding bytes, where 6 is optimal).
Optimal fields order:
name,
parent_name,
ops,
flags,
id,
reg,
bit,
cg_flags,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct afe_gate {
~~~~~~~^~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-audsys-clk.c:17:8: note: Excessive padding in 'struct afe_gate' (14 padding bytes, where 6 is optimal). Optimal fields order: name, parent_name, ops, flags, id, reg, bit, cg_flags, consider reordering the fields or adding explicit padding members
struct afe_gate {
~~~~~~~^~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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.
13 warnings generated.
>> sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:345:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:345:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 11 warnings (3 in non-user code, 8 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.
11 warnings generated.
>> sound/soc/mediatek/mt8195/mt8195-dai-adda.c:218:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-dai-adda.c:218:23: note: Value stored to 'afe' during its initialization is never read
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 10 warnings (3 in non-user code, 7 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.
10 warnings generated.
Suppressed 10 warnings (3 in non-user code, 7 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.
sound/core/oss/pcm_plugin.c:472:4: warning: Value stored to 'src_access' is never read [clang-analyzer-deadcode.DeadStores]
src_access = dst_access;
^ ~~~~~~~~~~
sound/core/oss/pcm_plugin.c:472:4: note: Value stored to 'src_access' is never read
src_access = dst_access;
^ ~~~~~~~~~~
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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
10 warnings generated.
sound/soc/xtensa/xtfpga-i2s.c:285:11: warning: Value stored to 'channels' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned channels = params_channels(params);
^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/xtensa/xtfpga-i2s.c:285:11: note: Value stored to 'channels' during its initialization is never read
unsigned channels = params_channels(params);
^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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 (2 in non-user code, 7 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.
12 warnings generated.
drivers/nvme/target/core.c:1123:10: warning: Although the value stored to 'cc_css' is used in the enclosing expression, the value is never actually read from 'cc_css' [clang-analyzer-deadcode.DeadStores]
switch (cc_css <<= NVME_CC_CSS_SHIFT) {
^ ~~~~~~~~~~~~~~~~~
drivers/nvme/target/core.c:1123:10: note: Although the value stored to 'cc_css' is used in the enclosing expression, the value is never actually read from 'cc_css'
switch (cc_css <<= NVME_CC_CSS_SHIFT) {
^ ~~~~~~~~~~~~~~~~~
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
12 warnings generated.
Suppressed 12 warnings (5 in non-user code, 7 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.
vim +/afe +208 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
6746cc85825998 Trevor Wu 2021-08-19 204
6746cc85825998 Trevor Wu 2021-08-19 205 static const struct mt8195_afe_channel_merge*
6746cc85825998 Trevor Wu 2021-08-19 206 mt8195_afe_found_cm(struct snd_soc_dai *dai)
6746cc85825998 Trevor Wu 2021-08-19 207 {
6746cc85825998 Trevor Wu 2021-08-19 @208 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
6746cc85825998 Trevor Wu 2021-08-19 209 int id = -EINVAL;
6746cc85825998 Trevor Wu 2021-08-19 210
6746cc85825998 Trevor Wu 2021-08-19 211 if (mt8195_afe_memif_is_ul(dai->id) == 0)
6746cc85825998 Trevor Wu 2021-08-19 212 return NULL;
6746cc85825998 Trevor Wu 2021-08-19 213
6746cc85825998 Trevor Wu 2021-08-19 214 switch (dai->id) {
6746cc85825998 Trevor Wu 2021-08-19 215 case MT8195_AFE_MEMIF_UL9:
6746cc85825998 Trevor Wu 2021-08-19 216 id = MT8195_AFE_CM0;
6746cc85825998 Trevor Wu 2021-08-19 217 break;
6746cc85825998 Trevor Wu 2021-08-19 218 case MT8195_AFE_MEMIF_UL2:
6746cc85825998 Trevor Wu 2021-08-19 219 id = MT8195_AFE_CM1;
6746cc85825998 Trevor Wu 2021-08-19 220 break;
6746cc85825998 Trevor Wu 2021-08-19 221 case MT8195_AFE_MEMIF_UL10:
6746cc85825998 Trevor Wu 2021-08-19 222 id = MT8195_AFE_CM2;
6746cc85825998 Trevor Wu 2021-08-19 223 break;
6746cc85825998 Trevor Wu 2021-08-19 224 default:
6746cc85825998 Trevor Wu 2021-08-19 225 break;
6746cc85825998 Trevor Wu 2021-08-19 226 }
6746cc85825998 Trevor Wu 2021-08-19 227
6746cc85825998 Trevor Wu 2021-08-19 228 if (id < 0) {
6746cc85825998 Trevor Wu 2021-08-19 229 dev_dbg(afe->dev, "%s, memif %d cannot find CM!\n",
6746cc85825998 Trevor Wu 2021-08-19 230 __func__, dai->id);
6746cc85825998 Trevor Wu 2021-08-19 231 return NULL;
6746cc85825998 Trevor Wu 2021-08-19 232 }
6746cc85825998 Trevor Wu 2021-08-19 233
6746cc85825998 Trevor Wu 2021-08-19 234 return &mt8195_afe_cm[id];
6746cc85825998 Trevor Wu 2021-08-19 235 }
6746cc85825998 Trevor Wu 2021-08-19 236
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-10 4:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 20:02 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:208:23: warning: Value stored to 'afe' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2022-04-09 6:33 kernel test robot
2022-04-10 4:16 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.