lkml.org 
[lkml]   [2021]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a2824f19e6065a0d3735acd9fe7155b104e7edf5
commit: 28564486866fa889b78264360022c94836fa8072 ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver
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/media/i2c/st-mipid02.c:747:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = bridge->i2c_client;
^~~~~~ ~~~~~~~~~~~~~~~~~~
drivers/media/i2c/st-mipid02.c:747:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = bridge->i2c_client;
^~~~~~ ~~~~~~~~~~~~~~~~~~
drivers/media/i2c/st-mipid02.c:919:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EINVAL;
^ ~~~~~~~
drivers/media/i2c/st-mipid02.c:919:3: note: Value stored to 'ret' is never read
ret = -EINVAL;
^ ~~~~~~~
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.
drivers/media/tuners/tuner-xc2028.c:1037:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = send_seq(priv, {0x00, 0x00});
^
drivers/media/tuners/tuner-xc2028.c:1037:3: note: Value stored to 'rc' is never read
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.
6 warnings generated.
Suppressed 6 warnings (6 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.
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.
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.
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.
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.
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.
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.
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

1044
1045 static irqreturn_t irq0_isr(int irq, void *devid)
1046 {
1047 struct fsl_xcvr *xcvr = (struct fsl_xcvr *)devid;
> 1048 struct device *dev = &xcvr->pdev->dev;
1049 struct regmap *regmap = xcvr->regmap;
1050 void __iomem *reg_ctrl, *reg_buff;
1051 u32 isr, isr_clr = 0, val, i;
1052
1053 regmap_read(regmap, FSL_XCVR_EXT_ISR, &isr);
1054
1055 if (isr & FSL_XCVR_IRQ_NEW_CS) {
1056 dev_dbg(dev, "Received new CS block\n");
1057 isr_clr |= FSL_XCVR_IRQ_NEW_CS;
1058 /* Data RAM is 4KiB, last two pages: 8 and 9. Select page 8. */
1059 regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_CTRL,
1060 FSL_XCVR_EXT_CTRL_PAGE_MASK,
1061 FSL_XCVR_EXT_CTRL_PAGE(8));
1062
1063 /* Find updated CS buffer */
1064 reg_ctrl = xcvr->ram_addr + FSL_XCVR_RX_CS_CTRL_0;
1065 reg_buff = xcvr->ram_addr + FSL_XCVR_RX_CS_BUFF_0;
1066 memcpy_fromio(&val, reg_ctrl, sizeof(val));
1067 if (!val) {
1068 reg_ctrl = xcvr->ram_addr + FSL_XCVR_RX_CS_CTRL_1;
1069 reg_buff = xcvr->ram_addr + FSL_XCVR_RX_CS_BUFF_1;
1070 memcpy_fromio(&val, reg_ctrl, sizeof(val));
1071 }
1072
1073 if (val) {
1074 /* copy CS buffer */
1075 memcpy_fromio(&xcvr->rx_iec958.status, reg_buff,
1076 sizeof(xcvr->rx_iec958.status));
1077 for (i = 0; i < 6; i++) {
1078 val = *(u32 *)(xcvr->rx_iec958.status + i*4);
1079 *(u32 *)(xcvr->rx_iec958.status + i*4) =
1080 bitrev32(val);
1081 }
1082 /* clear CS control register */
1083 memset_io(reg_ctrl, 0, sizeof(val));
1084 }
1085 }
1086 if (isr & FSL_XCVR_IRQ_NEW_UD) {
1087 dev_dbg(dev, "Received new UD block\n");
1088 isr_clr |= FSL_XCVR_IRQ_NEW_UD;
1089 }
1090 if (isr & FSL_XCVR_IRQ_MUTE) {
1091 dev_dbg(dev, "HW mute bit detected\n");
1092 isr_clr |= FSL_XCVR_IRQ_MUTE;
1093 }
1094 if (isr & FSL_XCVR_IRQ_FIFO_UOFL_ERR) {
1095 dev_dbg(dev, "RX/TX FIFO full/empty\n");
1096 isr_clr |= FSL_XCVR_IRQ_FIFO_UOFL_ERR;
1097 }
1098 if (isr & FSL_XCVR_IRQ_ARC_MODE) {
1099 dev_dbg(dev, "CMDC SM falls out of eARC mode\n");
1100 isr_clr |= FSL_XCVR_IRQ_ARC_MODE;
1101 }
1102 if (isr & FSL_XCVR_IRQ_DMA_RD_REQ) {
1103 dev_dbg(dev, "DMA read request\n");
1104 isr_clr |= FSL_XCVR_IRQ_DMA_RD_REQ;
1105 }
1106 if (isr & FSL_XCVR_IRQ_DMA_WR_REQ) {
1107 dev_dbg(dev, "DMA write request\n");
1108 isr_clr |= FSL_XCVR_IRQ_DMA_WR_REQ;
1109 }
1110
1111 if (isr_clr) {
1112 regmap_write(regmap, FSL_XCVR_EXT_ISR_CLR, isr_clr);
1113 return IRQ_HANDLED;
1114 }
1115
1116 return IRQ_NONE;
1117 }
1118

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-08-17 02:00    [W:0.055 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site