From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: sound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
Date: Fri, 27 Aug 2021 15:50:47 +0800 [thread overview]
Message-ID: <202108271544.ndhNteFh-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 20772 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Viorel Suman <viorel.suman@nxp.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 77dd11439b86e3f7990e4c0c9e0b67dca82750ba
commit: 28564486866fa889b78264360022c94836fa8072 ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver
date: 10 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 10 months ago
config: arm-randconfig-c002-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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=28564486866fa889b78264360022c94836fa8072
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 28564486866fa889b78264360022c94836fa8072
# save the attached .config 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 >>)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-sensor-custom.c:404:3: note: Value stored to 'ret' is never read
ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
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.
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.
5 warnings generated.
drivers/mmc/core/core.c:2010:19: warning: Value stored to 'host' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mmc_host *host = card->host;
^~~~ ~~~~~~~~~~
drivers/mmc/core/core.c:2010:19: note: Value stored to 'host' during its initialization is never read
struct mmc_host *host = card->host;
^~~~ ~~~~~~~~~~
Suppressed 4 warnings (4 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.
5 warnings generated.
Suppressed 5 warnings (4 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.
5 warnings generated.
Suppressed 5 warnings (4 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.
5 warnings generated.
Suppressed 5 warnings (4 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 (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.
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.
3 warnings generated.
sound/soc/soc-pcm.c:1955:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = dpcm_be_dai_hw_free(fe, stream);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-pcm.c:1955:2: note: Value stored to 'err' is never read
err = dpcm_be_dai_hw_free(fe, stream);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
5 warnings generated.
sound/soc/soc-ops.c:370:26: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
unsigned int mask = (1U << (fls(min + max) - 1)) - 1;
^ ~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-ops.c:370:26: note: The result of the left shift is undefined because the right operand is negative
unsigned int mask = (1U << (fls(min + max) - 1)) - 1;
^ ~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-ops.c:408:26: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
unsigned int mask = (1U << (fls(min + max) - 1)) - 1;
^ ~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-ops.c:408:26: note: The result of the left shift is undefined because the right operand is negative
unsigned int mask = (1U << (fls(min + max) - 1)) - 1;
^ ~~~~~~~~~~~~~~~~~~~~
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/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &xcvr->pdev->dev;
^~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_xcvr.c:1048:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = &xcvr->pdev->dev;
^~~ ~~~~~~~~~~~~~~~~
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.
6 warnings generated.
drivers/mmc/core/mmc.c:1700:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
drivers/mmc/core/mmc.c:1700:4: note: Value stored to 'err' is never read
err = 0;
^ ~
drivers/mmc/core/mmc.c:1805:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
drivers/mmc/core/mmc.c:1805:4: note: Value stored to 'err' is never read
err = 0;
^ ~
drivers/mmc/core/mmc.c:1834:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
drivers/mmc/core/mmc.c:1834:4: note: Value stored to 'err' is never read
err = 0;
^ ~
drivers/mmc/core/mmc.c:1854:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
drivers/mmc/core/mmc.c:1854:4: note: Value stored to 'err' is never read
err = 0;
^ ~
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.
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.
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.
Suppressed 4 warnings (4 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.
Suppressed 4 warnings (4 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.
vim +/dev +1048 sound/soc/fsl/fsl_xcvr.c
28564486866fa8 Viorel Suman 2020-10-13 1044
28564486866fa8 Viorel Suman 2020-10-13 1045 static irqreturn_t irq0_isr(int irq, void *devid)
28564486866fa8 Viorel Suman 2020-10-13 1046 {
28564486866fa8 Viorel Suman 2020-10-13 1047 struct fsl_xcvr *xcvr = (struct fsl_xcvr *)devid;
28564486866fa8 Viorel Suman 2020-10-13 @1048 struct device *dev = &xcvr->pdev->dev;
28564486866fa8 Viorel Suman 2020-10-13 1049 struct regmap *regmap = xcvr->regmap;
28564486866fa8 Viorel Suman 2020-10-13 1050 void __iomem *reg_ctrl, *reg_buff;
28564486866fa8 Viorel Suman 2020-10-13 1051 u32 isr, isr_clr = 0, val, i;
28564486866fa8 Viorel Suman 2020-10-13 1052
28564486866fa8 Viorel Suman 2020-10-13 1053 regmap_read(regmap, FSL_XCVR_EXT_ISR, &isr);
28564486866fa8 Viorel Suman 2020-10-13 1054
28564486866fa8 Viorel Suman 2020-10-13 1055 if (isr & FSL_XCVR_IRQ_NEW_CS) {
28564486866fa8 Viorel Suman 2020-10-13 1056 dev_dbg(dev, "Received new CS block\n");
28564486866fa8 Viorel Suman 2020-10-13 1057 isr_clr |= FSL_XCVR_IRQ_NEW_CS;
28564486866fa8 Viorel Suman 2020-10-13 1058 /* Data RAM is 4KiB, last two pages: 8 and 9. Select page 8. */
28564486866fa8 Viorel Suman 2020-10-13 1059 regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_CTRL,
28564486866fa8 Viorel Suman 2020-10-13 1060 FSL_XCVR_EXT_CTRL_PAGE_MASK,
28564486866fa8 Viorel Suman 2020-10-13 1061 FSL_XCVR_EXT_CTRL_PAGE(8));
28564486866fa8 Viorel Suman 2020-10-13 1062
28564486866fa8 Viorel Suman 2020-10-13 1063 /* Find updated CS buffer */
28564486866fa8 Viorel Suman 2020-10-13 1064 reg_ctrl = xcvr->ram_addr + FSL_XCVR_RX_CS_CTRL_0;
28564486866fa8 Viorel Suman 2020-10-13 1065 reg_buff = xcvr->ram_addr + FSL_XCVR_RX_CS_BUFF_0;
28564486866fa8 Viorel Suman 2020-10-13 1066 memcpy_fromio(&val, reg_ctrl, sizeof(val));
28564486866fa8 Viorel Suman 2020-10-13 1067 if (!val) {
28564486866fa8 Viorel Suman 2020-10-13 1068 reg_ctrl = xcvr->ram_addr + FSL_XCVR_RX_CS_CTRL_1;
28564486866fa8 Viorel Suman 2020-10-13 1069 reg_buff = xcvr->ram_addr + FSL_XCVR_RX_CS_BUFF_1;
28564486866fa8 Viorel Suman 2020-10-13 1070 memcpy_fromio(&val, reg_ctrl, sizeof(val));
28564486866fa8 Viorel Suman 2020-10-13 1071 }
28564486866fa8 Viorel Suman 2020-10-13 1072
28564486866fa8 Viorel Suman 2020-10-13 1073 if (val) {
28564486866fa8 Viorel Suman 2020-10-13 1074 /* copy CS buffer */
28564486866fa8 Viorel Suman 2020-10-13 1075 memcpy_fromio(&xcvr->rx_iec958.status, reg_buff,
28564486866fa8 Viorel Suman 2020-10-13 1076 sizeof(xcvr->rx_iec958.status));
28564486866fa8 Viorel Suman 2020-10-13 1077 for (i = 0; i < 6; i++) {
28564486866fa8 Viorel Suman 2020-10-13 1078 val = *(u32 *)(xcvr->rx_iec958.status + i*4);
28564486866fa8 Viorel Suman 2020-10-13 1079 *(u32 *)(xcvr->rx_iec958.status + i*4) =
28564486866fa8 Viorel Suman 2020-10-13 1080 bitrev32(val);
28564486866fa8 Viorel Suman 2020-10-13 1081 }
28564486866fa8 Viorel Suman 2020-10-13 1082 /* clear CS control register */
28564486866fa8 Viorel Suman 2020-10-13 1083 memset_io(reg_ctrl, 0, sizeof(val));
28564486866fa8 Viorel Suman 2020-10-13 1084 }
28564486866fa8 Viorel Suman 2020-10-13 1085 }
28564486866fa8 Viorel Suman 2020-10-13 1086 if (isr & FSL_XCVR_IRQ_NEW_UD) {
28564486866fa8 Viorel Suman 2020-10-13 1087 dev_dbg(dev, "Received new UD block\n");
28564486866fa8 Viorel Suman 2020-10-13 1088 isr_clr |= FSL_XCVR_IRQ_NEW_UD;
28564486866fa8 Viorel Suman 2020-10-13 1089 }
28564486866fa8 Viorel Suman 2020-10-13 1090 if (isr & FSL_XCVR_IRQ_MUTE) {
28564486866fa8 Viorel Suman 2020-10-13 1091 dev_dbg(dev, "HW mute bit detected\n");
28564486866fa8 Viorel Suman 2020-10-13 1092 isr_clr |= FSL_XCVR_IRQ_MUTE;
28564486866fa8 Viorel Suman 2020-10-13 1093 }
28564486866fa8 Viorel Suman 2020-10-13 1094 if (isr & FSL_XCVR_IRQ_FIFO_UOFL_ERR) {
28564486866fa8 Viorel Suman 2020-10-13 1095 dev_dbg(dev, "RX/TX FIFO full/empty\n");
28564486866fa8 Viorel Suman 2020-10-13 1096 isr_clr |= FSL_XCVR_IRQ_FIFO_UOFL_ERR;
28564486866fa8 Viorel Suman 2020-10-13 1097 }
28564486866fa8 Viorel Suman 2020-10-13 1098 if (isr & FSL_XCVR_IRQ_ARC_MODE) {
28564486866fa8 Viorel Suman 2020-10-13 1099 dev_dbg(dev, "CMDC SM falls out of eARC mode\n");
28564486866fa8 Viorel Suman 2020-10-13 1100 isr_clr |= FSL_XCVR_IRQ_ARC_MODE;
28564486866fa8 Viorel Suman 2020-10-13 1101 }
28564486866fa8 Viorel Suman 2020-10-13 1102 if (isr & FSL_XCVR_IRQ_DMA_RD_REQ) {
28564486866fa8 Viorel Suman 2020-10-13 1103 dev_dbg(dev, "DMA read request\n");
28564486866fa8 Viorel Suman 2020-10-13 1104 isr_clr |= FSL_XCVR_IRQ_DMA_RD_REQ;
28564486866fa8 Viorel Suman 2020-10-13 1105 }
28564486866fa8 Viorel Suman 2020-10-13 1106 if (isr & FSL_XCVR_IRQ_DMA_WR_REQ) {
28564486866fa8 Viorel Suman 2020-10-13 1107 dev_dbg(dev, "DMA write request\n");
28564486866fa8 Viorel Suman 2020-10-13 1108 isr_clr |= FSL_XCVR_IRQ_DMA_WR_REQ;
28564486866fa8 Viorel Suman 2020-10-13 1109 }
28564486866fa8 Viorel Suman 2020-10-13 1110
28564486866fa8 Viorel Suman 2020-10-13 1111 if (isr_clr) {
28564486866fa8 Viorel Suman 2020-10-13 1112 regmap_write(regmap, FSL_XCVR_EXT_ISR_CLR, isr_clr);
28564486866fa8 Viorel Suman 2020-10-13 1113 return IRQ_HANDLED;
28564486866fa8 Viorel Suman 2020-10-13 1114 }
28564486866fa8 Viorel Suman 2020-10-13 1115
28564486866fa8 Viorel Suman 2020-10-13 1116 return IRQ_NONE;
28564486866fa8 Viorel Suman 2020-10-13 1117 }
28564486866fa8 Viorel Suman 2020-10-13 1118
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26907 bytes --]
next reply other threads:[~2021-08-27 7:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 7:50 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-08-28 12:53 sound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2021-08-20 2:26 kernel test robot
2021-08-20 2:26 ` kernel test robot
2021-08-16 23:59 kernel test robot
2021-08-16 23:59 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202108271544.ndhNteFh-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is 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.