* sound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-16 23:59 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-08-16 23:59 UTC (permalink / raw)
To: Viorel Suman; +Cc: clang-built-linux, kbuild-all, linux-kernel, Mark Brown
[-- Attachment #1: Type: text/plain, Size: 13532 bytes --]
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26908 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* sound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-16 23:59 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-08-16 23:59 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 13768 bytes --]
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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26908 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* sound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-28 12:53 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-08-28 12:53 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 22223 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: 64b4fc45bea6f4faa843d2f97ff51665280efee1
commit: 28564486866fa889b78264360022c94836fa8072 ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver
date: 10 months ago
:::::: branch date: 14 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 >>)
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.
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.
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 (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.
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.
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.
14 warnings generated.
Suppressed 14 warnings (4 in non-user code, 10 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.
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.
9 warnings generated.
sound/soc/codecs/cs42l42.c:575:8: warning: Excessive padding in 'struct cs42l42_pll_params' (5 padding bytes, where 1 is optimal).
Optimal fields order:
sclk,
pll_div_frac,
mclk_int,
mclk_div,
mclk_src_sel,
sclk_prediv,
pll_div_int,
pll_mode,
pll_divout,
pll_cal_ratio,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct cs42l42_pll_params {
~~~~~~~^~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:575:8: note: Excessive padding in 'struct cs42l42_pll_params' (5 padding bytes, where 1 is optimal). Optimal fields order: sclk, pll_div_frac, mclk_int, mclk_div, mclk_src_sel, sclk_prediv, pll_div_int, pll_mode, pll_divout, pll_cal_ratio, consider reordering the fields or adding explicit padding members
struct cs42l42_pll_params {
~~~~~~~^~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:1338:28: warning: Value stored to 'component' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct snd_soc_component *component = cs42l42->component;
^~~~~~~~~ ~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:1338:28: note: Value stored to 'component' during its initialization is never read
struct snd_soc_component *component = cs42l42->component;
^~~~~~~~~ ~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:1818:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_AB, ®);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:1818:2: note: Value stored to 'ret' is never read
ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_AB, ®);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:1821:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_CD, ®);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:1821:2: note: Value stored to 'ret' is never read
ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_CD, ®);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:1824:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_E, ®);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cs42l42.c:1824:2: note: Value stored to 'ret' is never read
ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_E, ®);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
>> 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.
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.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/media/i2c/st-mipid02.c:623: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:623: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:679: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:679: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: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.
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.
kernel/kallsyms.c:369:3: 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(buffer, name);
^~~~~~
kernel/kallsyms.c:369:3: 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(buffer, name);
^~~~~~
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.
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.
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.
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
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: 26908 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* sound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-27 7:50 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-08-27 7:50 UTC (permalink / raw)
To: kbuild
[-- 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 --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* sound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-20 2:26 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-08-20 2:26 UTC (permalink / raw)
To: Viorel Suman; +Cc: clang-built-linux, kbuild-all, linux-kernel, Mark Brown
[-- Attachment #1: Type: text/plain, Size: 17041 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d992fe5318d8d7af9510b879439a3c7f283da442
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 >>)
include/linux/minmax.h:130:36: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:110:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:44:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:39:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:34:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^~~
drivers/hwmon/lm75.h:27:14: note: '?' condition is true
int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
^
include/linux/minmax.h:143:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^
include/linux/minmax.h:130:36: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^
include/linux/minmax.h:110:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^
include/linux/minmax.h:44:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^
include/linux/minmax.h:39:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^
include/linux/minmax.h:34:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^
drivers/hwmon/lm75.h:29:12: note: 'ntemp' is < 0
ntemp += (ntemp < 0 ? -250 : 250);
^~~~~
drivers/hwmon/lm75.h:29:12: note: '?' condition is true
drivers/hwmon/lm75.h:30:29: note: The result of the left shift is undefined because the left operand is negative
return (u16)((ntemp / 500) << 7);
~~~~~~~~~~~~~ ^
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.
10 warnings generated.
sound/soc/fsl/fsl_spdif.c:153:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:153:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:169:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:169:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:221:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:221:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:238:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:238:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:270:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:270:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:372:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:372:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:844:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:844:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
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.
>> 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.
sound/soc/img/img-spdif-in.c:787:30: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
reg |= (spdif->lock_release << IMG_SPDIF_IN_CTL_LOCKLO_SHIFT) &
~~~~~~~~~~~~~~~~~~~ ^
sound/soc/img/img-spdif-in.c:728:6: note: Assuming 'spdif' is non-null
if (!spdif)
^~~~~~
sound/soc/img/img-spdif-in.c:728:2: note: Taking false branch
if (!spdif)
^
sound/soc/img/img-spdif-in.c:731:2: note: Calling 'platform_set_drvdata'
platform_set_drvdata(pdev, spdif);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:239:2: note: Calling 'dev_set_drvdata'
dev_set_drvdata(&pdev->dev, data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:663:1: note: Returning without writing to 'data->lock_release'
}
^
include/linux/platform_device.h:239:2: note: Returning from 'dev_set_drvdata'
dev_set_drvdata(&pdev->dev, data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:240:1: note: Returning without writing to 'data->lock_release'
}
^
sound/soc/img/img-spdif-in.c:731:2: note: Returning from 'platform_set_drvdata'
platform_set_drvdata(pdev, spdif);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:737:6: note: Calling 'IS_ERR'
if (IS_ERR(base))
^~~~~~~~~~~~
include/linux/err.h:36:9: note: Assuming the condition is false
return IS_ERR_VALUE((unsigned long)ptr);
^
include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
return IS_ERR_VALUE((unsigned long)ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:737:6: note: Returning from 'IS_ERR'
if (IS_ERR(base))
^~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:737:2: note: Taking false branch
if (IS_ERR(base))
^
sound/soc/img/img-spdif-in.c:743:6: note: Calling 'IS_ERR'
if (IS_ERR(spdif->clk_sys)) {
^~~~~~~~~~~~~~~~~~~~~~
include/linux/err.h:36:9: note: Assuming the condition is false
return IS_ERR_VALUE((unsigned long)ptr);
^
include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
return IS_ERR_VALUE((unsigned long)ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:743:6: note: Returning from 'IS_ERR'
if (IS_ERR(spdif->clk_sys)) {
^~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:743:2: note: Taking false branch
if (IS_ERR(spdif->clk_sys)) {
^
sound/soc/img/img-spdif-in.c:750:7: note: Calling 'pm_runtime_enabled'
if (!pm_runtime_enabled(&pdev->dev)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pm_runtime.h:263:61: note: Returning zero, which participates in a condition later
static inline bool pm_runtime_enabled(struct device *dev) { return false; }
^~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:750:7: note: Returning from 'pm_runtime_enabled'
if (!pm_runtime_enabled(&pdev->dev)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:750:2: note: Taking true branch
if (!pm_runtime_enabled(&pdev->dev)) {
^
sound/soc/img/img-spdif-in.c:751:9: note: Calling 'img_spdif_in_runtime_resume'
ret = img_spdif_in_runtime_resume(&pdev->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:104:8: note: Calling 'clk_prepare_enable'
ret = clk_prepare_enable(spdif->clk_sys);
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26908 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* sound/soc/fsl/fsl_xcvr.c:1048:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-20 2:26 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-08-20 2:26 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 17349 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d992fe5318d8d7af9510b879439a3c7f283da442
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 >>)
include/linux/minmax.h:130:36: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:110:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:44:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:39:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:34:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^~~
drivers/hwmon/lm75.h:27:14: note: '?' condition is true
int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
^
include/linux/minmax.h:143:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^
include/linux/minmax.h:130:36: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^
include/linux/minmax.h:110:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^
include/linux/minmax.h:44:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^
include/linux/minmax.h:39:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^
include/linux/minmax.h:34:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^
drivers/hwmon/lm75.h:29:12: note: 'ntemp' is < 0
ntemp += (ntemp < 0 ? -250 : 250);
^~~~~
drivers/hwmon/lm75.h:29:12: note: '?' condition is true
drivers/hwmon/lm75.h:30:29: note: The result of the left shift is undefined because the left operand is negative
return (u16)((ntemp / 500) << 7);
~~~~~~~~~~~~~ ^
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.
10 warnings generated.
sound/soc/fsl/fsl_spdif.c:153:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:153:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:169:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:169:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:221:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:221:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:238:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:238:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:270:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:270:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:372:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:372:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:844:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_spdif.c:844:26: note: Value stored to 'pdev' during its initialization is never read
struct platform_device *pdev = spdif_priv->pdev;
^~~~ ~~~~~~~~~~~~~~~~
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.
>> 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.
sound/soc/img/img-spdif-in.c:787:30: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
reg |= (spdif->lock_release << IMG_SPDIF_IN_CTL_LOCKLO_SHIFT) &
~~~~~~~~~~~~~~~~~~~ ^
sound/soc/img/img-spdif-in.c:728:6: note: Assuming 'spdif' is non-null
if (!spdif)
^~~~~~
sound/soc/img/img-spdif-in.c:728:2: note: Taking false branch
if (!spdif)
^
sound/soc/img/img-spdif-in.c:731:2: note: Calling 'platform_set_drvdata'
platform_set_drvdata(pdev, spdif);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:239:2: note: Calling 'dev_set_drvdata'
dev_set_drvdata(&pdev->dev, data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:663:1: note: Returning without writing to 'data->lock_release'
}
^
include/linux/platform_device.h:239:2: note: Returning from 'dev_set_drvdata'
dev_set_drvdata(&pdev->dev, data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:240:1: note: Returning without writing to 'data->lock_release'
}
^
sound/soc/img/img-spdif-in.c:731:2: note: Returning from 'platform_set_drvdata'
platform_set_drvdata(pdev, spdif);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:737:6: note: Calling 'IS_ERR'
if (IS_ERR(base))
^~~~~~~~~~~~
include/linux/err.h:36:9: note: Assuming the condition is false
return IS_ERR_VALUE((unsigned long)ptr);
^
include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
return IS_ERR_VALUE((unsigned long)ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:737:6: note: Returning from 'IS_ERR'
if (IS_ERR(base))
^~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:737:2: note: Taking false branch
if (IS_ERR(base))
^
sound/soc/img/img-spdif-in.c:743:6: note: Calling 'IS_ERR'
if (IS_ERR(spdif->clk_sys)) {
^~~~~~~~~~~~~~~~~~~~~~
include/linux/err.h:36:9: note: Assuming the condition is false
return IS_ERR_VALUE((unsigned long)ptr);
^
include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
return IS_ERR_VALUE((unsigned long)ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:743:6: note: Returning from 'IS_ERR'
if (IS_ERR(spdif->clk_sys)) {
^~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:743:2: note: Taking false branch
if (IS_ERR(spdif->clk_sys)) {
^
sound/soc/img/img-spdif-in.c:750:7: note: Calling 'pm_runtime_enabled'
if (!pm_runtime_enabled(&pdev->dev)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pm_runtime.h:263:61: note: Returning zero, which participates in a condition later
static inline bool pm_runtime_enabled(struct device *dev) { return false; }
^~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:750:7: note: Returning from 'pm_runtime_enabled'
if (!pm_runtime_enabled(&pdev->dev)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:750:2: note: Taking true branch
if (!pm_runtime_enabled(&pdev->dev)) {
^
sound/soc/img/img-spdif-in.c:751:9: note: Calling 'img_spdif_in_runtime_resume'
ret = img_spdif_in_runtime_resume(&pdev->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/img/img-spdif-in.c:104:8: note: Calling 'clk_prepare_enable'
ret = clk_prepare_enable(spdif->clk_sys);
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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26908 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-28 12:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 23:59 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-16 23:59 ` kernel test robot
2021-08-20 2:26 kernel test robot
2021-08-20 2:26 ` kernel test robot
2021-08-27 7:50 kernel test robot
2021-08-28 12:53 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.