From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/dma/xilinx/zynqmp_dma.c:359:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
Date: Tue, 16 Nov 2021 06:37:18 +0800 [thread overview]
Message-ID: <202111160607.z82yVVxZ-lkp@intel.com> (raw)
[-- 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 --]
next reply other threads:[~2021-11-15 22:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 22:37 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202111160607.z82yVVxZ-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.