* drivers/dma/xilinx/zynqmp_dma.c:359:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-11-15 22:37 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-15 22:37 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 19485 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Michael Tretter <m.tretter@pengutronix.de>
CC: Vinod Koul <vkoul@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 7073b5a8bd6ea641b41568e2899b0977f79134e3 dmaengine: zynqmp_dma: enable COMPILE_TEST
date: 6 weeks ago
:::::: branch date: 20 hours ago
:::::: commit date: 6 weeks ago
config: riscv-randconfig-c006-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7073b5a8bd6ea641b41568e2899b0977f79134e3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7073b5a8bd6ea641b41568e2899b0977f79134e3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
ret = cx24120_writereg(state, CX24120_REG_RATEDIV, ret);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/dvb-frontends/cx24120.c:1229:2: note: Value stored to 'ret' is never read
ret = cx24120_writereg(state, CX24120_REG_RATEDIV, ret);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/dvb-frontends/cx24120.c:1471:24: warning: Value stored to 'state' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct cx24120_state *state = fe->demodulator_priv;
^~~~~ ~~~~~~~~~~~~~~~~~~~~
drivers/media/dvb-frontends/cx24120.c:1471:24: note: Value stored to 'state' during its initialization is never read
struct cx24120_state *state = fe->demodulator_priv;
^~~~~ ~~~~~~~~~~~~~~~~~~~~
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/media/dvb-frontends/stv0900_sw.c:1978:4: warning: Value stored to 'lock' is never read [clang-analyzer-deadcode.DeadStores]
lock = TRUE;
^
drivers/media/dvb-frontends/stv0900_sw.c:1978:4: note: Value stored to 'lock' is never read
drivers/media/dvb-frontends/stv0900_sw.c:1993:4: warning: Value stored to 'lock' is never read [clang-analyzer-deadcode.DeadStores]
lock = FALSE;
^
drivers/media/dvb-frontends/stv0900_sw.c:1993:4: note: Value stored to 'lock' 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.
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.
Suppressed 5 warnings (5 in non-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 (5 in non-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 (5 in non-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 (5 in non-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.
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.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
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.
5 warnings generated.
>> drivers/dma/xilinx/zynqmp_dma.c:359:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
val = readl(chan->regs + ZYNQMP_DMA_IRQ_SRC_ACCT);
^
drivers/dma/xilinx/zynqmp_dma.c:359:2: note: Value stored to 'val' is never read
drivers/dma/xilinx/zynqmp_dma.c:360:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
val = readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT);
^
drivers/dma/xilinx/zynqmp_dma.c:360:2: note: Value stored to 'val' 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.
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.
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.
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.
4 warnings generated.
drivers/iio/imu/fxos8700_core.c:167:8: warning: Excessive padding in 'struct fxos8700_data' (106 padding bytes, where 42 is optimal).
Optimal fields order:
buf,
regmap,
trig,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct fxos8700_data {
~~~~~~~^~~~~~~~~~~~~~~
drivers/iio/imu/fxos8700_core.c:167:8: note: Excessive padding in 'struct fxos8700_data' (106 padding bytes, where 42 is optimal). Optimal fields order: buf, regmap, trig, consider reordering the fields or adding explicit padding members
struct fxos8700_data {
~~~~~~~^~~~~~~~~~~~~~~
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
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.
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.
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/mtd/mtdsuper.c:27:19: warning: Value stored to 'mtd' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct mtd_info *mtd = fc->sget_key;
^~~ ~~~~~~~~~~~~
drivers/mtd/mtdsuper.c:27:19: note: Value stored to 'mtd' during its initialization is never read
struct mtd_info *mtd = fc->sget_key;
^~~ ~~~~~~~~~~~~
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.
7 warnings generated.
drivers/mtd/mtdconcat.c:67:4: warning: Value stored to 'size' is never read [clang-analyzer-deadcode.DeadStores]
size = 0;
^ ~
drivers/mtd/mtdconcat.c:67:4: note: Value stored to 'size' is never read
size = 0;
^ ~
drivers/mtd/mtdconcat.c:159:4: warning: Value stored to 'size' is never read [clang-analyzer-deadcode.DeadStores]
vim +/val +359 drivers/dma/xilinx/zynqmp_dma.c
b0cc417c163719 Kedareswara rao Appana 2016-07-01 329
b0cc417c163719 Kedareswara rao Appana 2016-07-01 330 /**
b0cc417c163719 Kedareswara rao Appana 2016-07-01 331 * zynqmp_dma_init - Initialize the channel
b0cc417c163719 Kedareswara rao Appana 2016-07-01 332 * @chan: ZynqMP DMA channel pointer
b0cc417c163719 Kedareswara rao Appana 2016-07-01 333 */
b0cc417c163719 Kedareswara rao Appana 2016-07-01 334 static void zynqmp_dma_init(struct zynqmp_dma_chan *chan)
b0cc417c163719 Kedareswara rao Appana 2016-07-01 335 {
b0cc417c163719 Kedareswara rao Appana 2016-07-01 336 u32 val;
b0cc417c163719 Kedareswara rao Appana 2016-07-01 337
b0cc417c163719 Kedareswara rao Appana 2016-07-01 338 writel(ZYNQMP_DMA_IDS_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IDS);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 339 val = readl(chan->regs + ZYNQMP_DMA_ISR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 340 writel(val, chan->regs + ZYNQMP_DMA_ISR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 341
b0cc417c163719 Kedareswara rao Appana 2016-07-01 342 if (chan->is_dmacoherent) {
b0cc417c163719 Kedareswara rao Appana 2016-07-01 343 val = ZYNQMP_DMA_AXCOHRNT;
b0cc417c163719 Kedareswara rao Appana 2016-07-01 344 val = (val & ~ZYNQMP_DMA_AXCACHE) |
b0cc417c163719 Kedareswara rao Appana 2016-07-01 345 (ZYNQMP_DMA_AXCACHE_VAL << ZYNQMP_DMA_AXCACHE_OFST);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 346 writel(val, chan->regs + ZYNQMP_DMA_DSCR_ATTR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 347 }
b0cc417c163719 Kedareswara rao Appana 2016-07-01 348
b0cc417c163719 Kedareswara rao Appana 2016-07-01 349 val = readl(chan->regs + ZYNQMP_DMA_DATA_ATTR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 350 if (chan->is_dmacoherent) {
b0cc417c163719 Kedareswara rao Appana 2016-07-01 351 val = (val & ~ZYNQMP_DMA_ARCACHE) |
b0cc417c163719 Kedareswara rao Appana 2016-07-01 352 (ZYNQMP_DMA_AXCACHE_VAL << ZYNQMP_DMA_ARCACHE_OFST);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 353 val = (val & ~ZYNQMP_DMA_AWCACHE) |
b0cc417c163719 Kedareswara rao Appana 2016-07-01 354 (ZYNQMP_DMA_AXCACHE_VAL << ZYNQMP_DMA_AWCACHE_OFST);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 355 }
b0cc417c163719 Kedareswara rao Appana 2016-07-01 356 writel(val, chan->regs + ZYNQMP_DMA_DATA_ATTR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 357
b0cc417c163719 Kedareswara rao Appana 2016-07-01 358 /* Clearing the interrupt account rgisters */
b0cc417c163719 Kedareswara rao Appana 2016-07-01 @359 val = readl(chan->regs + ZYNQMP_DMA_IRQ_SRC_ACCT);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 360 val = readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 361
b0cc417c163719 Kedareswara rao Appana 2016-07-01 362 chan->idle = true;
b0cc417c163719 Kedareswara rao Appana 2016-07-01 363 }
b0cc417c163719 Kedareswara rao Appana 2016-07-01 364
:::::: The code at line 359 was first introduced by commit
:::::: b0cc417c1637192be658e68a74c8d1568e3d35f6 dmaengine: Add Xilinx zynqmp dma engine driver support
:::::: TO: Kedareswara rao Appana <appana.durga.rao@xilinx.com>
:::::: CC: Vinod Koul <vinod.koul@intel.com>
---
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: 28760 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* drivers/dma/xilinx/zynqmp_dma.c:359:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-12-12 20:56 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-12-12 20:56 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 17915 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Michael Tretter <m.tretter@pengutronix.de>
CC: Vinod Koul <vkoul@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a763d5a5abd65797aec3dd1bf01fe2ccbec32967
commit: 7073b5a8bd6ea641b41568e2899b0977f79134e3 dmaengine: zynqmp_dma: enable COMPILE_TEST
date: 2 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 2 months ago
config: riscv-randconfig-c006-20211210 (https://download.01.org/0day-ci/archive/20211213/202112130410.SA6DfvDP-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7073b5a8bd6ea641b41568e2899b0977f79134e3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7073b5a8bd6ea641b41568e2899b0977f79134e3
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^
drivers/regulator/rohm-regulator.c:31:6: note: Assuming 'mask' is not equal to 0
if (!mask) {
^~~~~
drivers/regulator/rohm-regulator.c:31:2: note: Taking false branch
if (!mask) {
^
drivers/regulator/rohm-regulator.c:37:14: note: Assuming 'i' is < field 'n_voltages'
for (i = 0; i < desc->n_voltages; i++) {
^~~~~~~~~~~~~~~~~~~~
drivers/regulator/rohm-regulator.c:37:2: note: Loop condition is true. Entering loop body
for (i = 0; i < desc->n_voltages; i++) {
^
drivers/regulator/rohm-regulator.c:39:7: note: Assuming field 'linear_range_selectors' is null
if (desc->linear_range_selectors)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/rohm-regulator.c:39:3: note: Taking false branch
if (desc->linear_range_selectors)
^
drivers/regulator/rohm-regulator.c:41:7: note: Assuming field 'n_linear_ranges' is 0
if (desc->n_linear_ranges)
^~~~~~~~~~~~~~~~~~~~~
drivers/regulator/rohm-regulator.c:41:3: note: Taking false branch
if (desc->n_linear_ranges)
^
drivers/regulator/rohm-regulator.c:45:7: note: Assuming 'ret' is >= 0
if (ret < 0)
^~~~~~~
drivers/regulator/rohm-regulator.c:45:3: note: Taking false branch
if (ret < 0)
^
drivers/regulator/rohm-regulator.c:47:7: note: Assuming 'ret' is equal to 'uv'
if (ret == uv) {
^~~~~~~~~
drivers/regulator/rohm-regulator.c:47:3: note: Taking true branch
if (ret == uv) {
^
drivers/regulator/rohm-regulator.c:48:6: note: Assigned value is garbage or undefined
i <<= ffs(desc->vsel_mask) - 1;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 5 warnings (5 in non-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.
Suppressed 5 warnings (5 in non-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.
Suppressed 5 warnings (5 in non-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 (5 in non-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 (5 in non-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.
7 warnings generated.
drivers/mfd/sm501.c:513:16: warning: Value stored to 'mode' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned long mode = smc501_readl(sm->regs + SM501_POWER_MODE_CONTROL);
^~~~
drivers/mfd/sm501.c:513:16: note: Value stored to 'mode' during its initialization is never read
unsigned long mode = smc501_readl(sm->regs + SM501_POWER_MODE_CONTROL);
^~~~
drivers/mfd/sm501.c:514:16: warning: Value stored to 'gate' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned long gate = smc501_readl(sm->regs + SM501_CURRENT_GATE);
^~~~
drivers/mfd/sm501.c:514:16: note: Value stored to 'gate' during its initialization is never read
unsigned long gate = smc501_readl(sm->regs + SM501_CURRENT_GATE);
^~~~
drivers/mfd/sm501.c:515:16: warning: Value stored to 'clock' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned long clock = smc501_readl(sm->regs + SM501_CURRENT_CLOCK);
^~~~~
drivers/mfd/sm501.c:515:16: note: Value stored to 'clock' during its initialization is never read
unsigned long clock = smc501_readl(sm->regs + SM501_CURRENT_CLOCK);
^~~~~
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.
5 warnings generated.
Suppressed 5 warnings (5 in non-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.
5 warnings generated.
>> drivers/dma/xilinx/zynqmp_dma.c:359:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
val = readl(chan->regs + ZYNQMP_DMA_IRQ_SRC_ACCT);
^
drivers/dma/xilinx/zynqmp_dma.c:359:2: note: Value stored to 'val' is never read
drivers/dma/xilinx/zynqmp_dma.c:360:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
val = readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT);
^
drivers/dma/xilinx/zynqmp_dma.c:360:2: note: Value stored to 'val' 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.
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.
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.
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.
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.
drivers/nvme/host/ioctl.c:230:7: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
if (put_user(result, &ucmd->result))
^
arch/riscv/include/asm/uaccess.h:354:3: note: expanded from macro 'put_user'
__put_user((x), __p) : \
^
arch/riscv/include/asm/uaccess.h:321:2: note: expanded from macro '__put_user'
__typeof__(*__gu_ptr) __val = (x); \
^
drivers/nvme/host/ioctl.c:479:2: note: Control jumps to 'case 3225964097:' at line 480
switch (cmd) {
^
drivers/nvme/host/ioctl.c:481:10: note: Calling 'nvme_user_cmd'
return nvme_user_cmd(ctrl, NULL, argp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c:196:2: note: 'result' declared without an initial value
u64 result;
^~~~~~~~~~
drivers/nvme/host/ioctl.c:199:6: note: Assuming the condition is false
if (!capable(CAP_SYS_ADMIN))
^~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c:199:2: note: Taking false branch
if (!capable(CAP_SYS_ADMIN))
^
drivers/nvme/host/ioctl.c:201:6: note: Calling 'copy_from_user'
if (copy_from_user(&cmd, ucmd, sizeof(cmd)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/uaccess.h:191:2: note: Taking true branch
if (likely(check_copy_size(to, n, false)))
^
include/linux/uaccess.h:192:7: note: Value assigned to 'cmd.flags', which participates in a condition later
n = _copy_from_user(to, from, n);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/uaccess.h:193:2: note: Returning value (loaded from 'n'), which participates in a condition later
return n;
^~~~~~~~
drivers/nvme/host/ioctl.c:201:6: note: Returning from 'copy_from_user'
if (copy_from_user(&cmd, ucmd, sizeof(cmd)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c:201:6: note: Assuming the condition is false
if (copy_from_user(&cmd, ucmd, sizeof(cmd)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c:201:2: note: Taking false branch
if (copy_from_user(&cmd, ucmd, sizeof(cmd)))
^
drivers/nvme/host/ioctl.c:203:6: note: Assuming field 'flags' is 0
if (cmd.flags)
^~~~~~~~~
drivers/nvme/host/ioctl.c:203:2: note: Taking false branch
if (cmd.flags)
^
vim +/val +359 drivers/dma/xilinx/zynqmp_dma.c
b0cc417c163719 Kedareswara rao Appana 2016-07-01 329
b0cc417c163719 Kedareswara rao Appana 2016-07-01 330 /**
b0cc417c163719 Kedareswara rao Appana 2016-07-01 331 * zynqmp_dma_init - Initialize the channel
b0cc417c163719 Kedareswara rao Appana 2016-07-01 332 * @chan: ZynqMP DMA channel pointer
b0cc417c163719 Kedareswara rao Appana 2016-07-01 333 */
b0cc417c163719 Kedareswara rao Appana 2016-07-01 334 static void zynqmp_dma_init(struct zynqmp_dma_chan *chan)
b0cc417c163719 Kedareswara rao Appana 2016-07-01 335 {
b0cc417c163719 Kedareswara rao Appana 2016-07-01 336 u32 val;
b0cc417c163719 Kedareswara rao Appana 2016-07-01 337
b0cc417c163719 Kedareswara rao Appana 2016-07-01 338 writel(ZYNQMP_DMA_IDS_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IDS);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 339 val = readl(chan->regs + ZYNQMP_DMA_ISR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 340 writel(val, chan->regs + ZYNQMP_DMA_ISR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 341
b0cc417c163719 Kedareswara rao Appana 2016-07-01 342 if (chan->is_dmacoherent) {
b0cc417c163719 Kedareswara rao Appana 2016-07-01 343 val = ZYNQMP_DMA_AXCOHRNT;
b0cc417c163719 Kedareswara rao Appana 2016-07-01 344 val = (val & ~ZYNQMP_DMA_AXCACHE) |
b0cc417c163719 Kedareswara rao Appana 2016-07-01 345 (ZYNQMP_DMA_AXCACHE_VAL << ZYNQMP_DMA_AXCACHE_OFST);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 346 writel(val, chan->regs + ZYNQMP_DMA_DSCR_ATTR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 347 }
b0cc417c163719 Kedareswara rao Appana 2016-07-01 348
b0cc417c163719 Kedareswara rao Appana 2016-07-01 349 val = readl(chan->regs + ZYNQMP_DMA_DATA_ATTR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 350 if (chan->is_dmacoherent) {
b0cc417c163719 Kedareswara rao Appana 2016-07-01 351 val = (val & ~ZYNQMP_DMA_ARCACHE) |
b0cc417c163719 Kedareswara rao Appana 2016-07-01 352 (ZYNQMP_DMA_AXCACHE_VAL << ZYNQMP_DMA_ARCACHE_OFST);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 353 val = (val & ~ZYNQMP_DMA_AWCACHE) |
b0cc417c163719 Kedareswara rao Appana 2016-07-01 354 (ZYNQMP_DMA_AXCACHE_VAL << ZYNQMP_DMA_AWCACHE_OFST);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 355 }
b0cc417c163719 Kedareswara rao Appana 2016-07-01 356 writel(val, chan->regs + ZYNQMP_DMA_DATA_ATTR);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 357
b0cc417c163719 Kedareswara rao Appana 2016-07-01 358 /* Clearing the interrupt account rgisters */
b0cc417c163719 Kedareswara rao Appana 2016-07-01 @359 val = readl(chan->regs + ZYNQMP_DMA_IRQ_SRC_ACCT);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 360 val = readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT);
b0cc417c163719 Kedareswara rao Appana 2016-07-01 361
b0cc417c163719 Kedareswara rao Appana 2016-07-01 362 chan->idle = true;
b0cc417c163719 Kedareswara rao Appana 2016-07-01 363 }
b0cc417c163719 Kedareswara rao Appana 2016-07-01 364
:::::: The code at line 359 was first introduced by commit
:::::: b0cc417c1637192be658e68a74c8d1568e3d35f6 dmaengine: Add Xilinx zynqmp dma engine driver support
:::::: TO: Kedareswara rao Appana <appana.durga.rao@xilinx.com>
:::::: CC: Vinod Koul <vinod.koul@intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-12 20:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-12 20:56 drivers/dma/xilinx/zynqmp_dma.c:359:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-11-15 22:37 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.