From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/dma/sh/rz-dmac.c:253:18: warning: Value stored to 'dmac' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
Date: Thu, 30 Dec 2021 11:08:49 +0800 [thread overview]
Message-ID: <202112301019.TuIgtJix-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 18371 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Biju Das <biju.das.jz@bp.renesas.com>
CC: Vinod Koul <vkoul@kernel.org>
CC: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: eec4df26e24e978e49ccf9bcf49ca0f2ccdaeffe
commit: 5000d37042a61ca556fde2782ca40dbfa802ea16 dmaengine: sh: Add DMAC driver for RZ/G2L SoC
date: 4 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 4 months ago
config: arm-randconfig-c002-20211229 (https://download.01.org/0day-ci/archive/20211230/202112301019.TuIgtJix-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project cd284b7ac0615afc6e0f1a30da2777e361de27a3)
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=5000d37042a61ca556fde2782ca40dbfa802ea16
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5000d37042a61ca556fde2782ca40dbfa802ea16
# save the config file 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 >>)
14 warnings generated.
drivers/scsi/scsi_logging.c:72:3: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores]
off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:72:3: note: Value stored to 'off' is never read
off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:97:3: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores]
off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:97:3: note: Value stored to 'off' is never read
off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:206:3: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores]
off += scnprintf(logbuf + off, logbuf_len - off, "\n");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:206:3: note: Value stored to 'off' is never read
off += scnprintf(logbuf + off, logbuf_len - off, "\n");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:328:2: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores]
off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:328:2: note: Value stored to 'off' is never read
off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:336:2: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores]
off += scsi_format_extd_sense(logbuf + off, logbuf_len - off,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:336:2: note: Value stored to 'off' is never read
off += scsi_format_extd_sense(logbuf + off, logbuf_len - off,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:431:2: warning: Value stored to 'off' is never read [clang-analyzer-deadcode.DeadStores]
off += scnprintf(logbuf + off, logbuf_len - off,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_logging.c:431:2: note: Value stored to 'off' is never read
off += scnprintf(logbuf + off, logbuf_len - off,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 8 warnings (8 in non-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.
Suppressed 8 warnings (8 in non-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.
drivers/gpu/drm/panel/panel-elida-kd35t133.c:65:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx->dev;
^~~ ~~~~~~~~
drivers/gpu/drm/panel/panel-elida-kd35t133.c:65:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx->dev;
^~~ ~~~~~~~~
Suppressed 9 warnings (9 in non-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.
Suppressed 9 warnings (9 in non-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.
Suppressed 9 warnings (9 in non-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.
drivers/gpu/drm/panel/panel-innolux-p079zca.c:459:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = PTR_ERR(innolux->enable_gpio);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/panel/panel-innolux-p079zca.c:459:3: note: Value stored to 'err' is never read
err = PTR_ERR(innolux->enable_gpio);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (9 in non-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.
Suppressed 9 warnings (9 in non-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.
Suppressed 9 warnings (9 in non-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.
Suppressed 8 warnings (8 in non-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.
Suppressed 9 warnings (9 in non-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.
Suppressed 8 warnings (8 in non-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.
Suppressed 9 warnings (9 in non-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.
Suppressed 9 warnings (9 in non-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.
Suppressed 8 warnings (8 in non-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.
Suppressed 9 warnings (9 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
>> drivers/dma/sh/rz-dmac.c:253:18: warning: Value stored to 'dmac' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct rz_dmac *dmac = to_rz_dmac(chan->device);
^~~~
drivers/dma/sh/rz-dmac.c:253:18: note: Value stored to 'dmac' during its initialization is never read
struct rz_dmac *dmac = to_rz_dmac(chan->device);
^~~~
drivers/dma/sh/rz-dmac.c:284:18: warning: Value stored to 'dmac' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct rz_dmac *dmac = to_rz_dmac(chan->device);
^~~~
drivers/dma/sh/rz-dmac.c:284:18: note: Value stored to 'dmac' during its initialization is never read
struct rz_dmac *dmac = to_rz_dmac(chan->device);
^~~~
drivers/dma/sh/rz-dmac.c:311:20: warning: Value stored to 'lmdesc' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct rz_lmdesc *lmdesc = channel->lmdesc.base;
^~~~~~ ~~~~~~~~~~~~~~~~~~~~
drivers/dma/sh/rz-dmac.c:311:20: note: Value stored to 'lmdesc' during its initialization is never read
struct rz_lmdesc *lmdesc = channel->lmdesc.base;
^~~~~~ ~~~~~~~~~~~~~~~~~~~~
drivers/dma/sh/rz-dmac.c:475:18: warning: Value stored to 'dmac' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct rz_dmac *dmac = to_rz_dmac(chan->device);
^~~~
drivers/dma/sh/rz-dmac.c:475:18: note: Value stored to 'dmac' during its initialization is never read
struct rz_dmac *dmac = to_rz_dmac(chan->device);
^~~~
Suppressed 9 warnings (9 in non-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.
drivers/dma/sf-pdma/sf-pdma.c:59:6: warning: Access to field 'desc' results in a dereference of a null pointer (loaded from variable 'chan') [clang-analyzer-core.NullDereference]
if (chan->desc && !chan->desc->in_use) {
^
drivers/dma/sf-pdma/sf-pdma.c:95:30: note: Calling 'to_sf_pdma_chan'
struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);
^~~~~~~~~~~~~~~~~~~~~~
drivers/dma/sf-pdma/sf-pdma.c:44:9: note: Left side of '&&' is false
return container_of(dchan, struct sf_pdma_chan, vchan.chan);
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/dma/sf-pdma/sf-pdma.c:44:9: note: Taking false branch
return container_of(dchan, struct sf_pdma_chan, vchan.chan);
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:328:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:308:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
drivers/dma/sf-pdma/sf-pdma.c:44:9: note: Loop condition is false. Exiting loop
return container_of(dchan, struct sf_pdma_chan, vchan.chan);
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:328:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:306:2: note: expanded from macro '__compiletime_assert'
do { \
^
drivers/dma/sf-pdma/sf-pdma.c:44:2: note: Returning pointer, which participates in a condition later
return container_of(dchan, struct sf_pdma_chan, vchan.chan);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/sf-pdma/sf-pdma.c:44:2: note: Returning pointer
return container_of(dchan, struct sf_pdma_chan, vchan.chan);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/sf-pdma/sf-pdma.c:95:30: note: Returning from 'to_sf_pdma_chan'
struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);
^~~~~~~~~~~~~~~~~~~~~~
drivers/dma/sf-pdma/sf-pdma.c:95:2: note: 'chan' initialized here
struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/sf-pdma/sf-pdma.c:99:6: note: Assuming 'chan' is null
if (chan && (!len || !dest || !src)) {
^~~~
drivers/dma/sf-pdma/sf-pdma.c:99:11: note: Left side of '&&' is false
if (chan && (!len || !dest || !src)) {
^
drivers/dma/sf-pdma/sf-pdma.c:105:28: note: Passing null pointer value via 1st parameter 'chan'
desc = sf_pdma_alloc_desc(chan);
^~~~
drivers/dma/sf-pdma/sf-pdma.c:105:9: note: Calling 'sf_pdma_alloc_desc'
desc = sf_pdma_alloc_desc(chan);
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/sf-pdma/sf-pdma.c:57:2: note: Loop condition is false. Exiting loop
spin_lock_irqsave(&chan->lock, flags);
vim +/dmac +253 drivers/dma/sh/rz-dmac.c
5000d37042a61ca Biju Das 2021-08-06 249
5000d37042a61ca Biju Das 2021-08-06 250 static void rz_dmac_enable_hw(struct rz_dmac_chan *channel)
5000d37042a61ca Biju Das 2021-08-06 251 {
5000d37042a61ca Biju Das 2021-08-06 252 struct dma_chan *chan = &channel->vc.chan;
5000d37042a61ca Biju Das 2021-08-06 @253 struct rz_dmac *dmac = to_rz_dmac(chan->device);
5000d37042a61ca Biju Das 2021-08-06 254 unsigned long flags;
5000d37042a61ca Biju Das 2021-08-06 255 u32 nxla;
5000d37042a61ca Biju Das 2021-08-06 256 u32 chctrl;
5000d37042a61ca Biju Das 2021-08-06 257 u32 chstat;
5000d37042a61ca Biju Das 2021-08-06 258
5000d37042a61ca Biju Das 2021-08-06 259 dev_dbg(dmac->dev, "%s channel %d\n", __func__, channel->index);
5000d37042a61ca Biju Das 2021-08-06 260
5000d37042a61ca Biju Das 2021-08-06 261 local_irq_save(flags);
5000d37042a61ca Biju Das 2021-08-06 262
5000d37042a61ca Biju Das 2021-08-06 263 rz_dmac_lmdesc_recycle(channel);
5000d37042a61ca Biju Das 2021-08-06 264
5000d37042a61ca Biju Das 2021-08-06 265 nxla = channel->lmdesc.base_dma +
5000d37042a61ca Biju Das 2021-08-06 266 (sizeof(struct rz_lmdesc) * (channel->lmdesc.head -
5000d37042a61ca Biju Das 2021-08-06 267 channel->lmdesc.base));
5000d37042a61ca Biju Das 2021-08-06 268
5000d37042a61ca Biju Das 2021-08-06 269 chstat = rz_dmac_ch_readl(channel, CHSTAT, 1);
5000d37042a61ca Biju Das 2021-08-06 270 if (!(chstat & CHSTAT_EN)) {
5000d37042a61ca Biju Das 2021-08-06 271 chctrl = (channel->chctrl | CHCTRL_SETEN);
5000d37042a61ca Biju Das 2021-08-06 272 rz_dmac_ch_writel(channel, nxla, NXLA, 1);
5000d37042a61ca Biju Das 2021-08-06 273 rz_dmac_ch_writel(channel, channel->chcfg, CHCFG, 1);
5000d37042a61ca Biju Das 2021-08-06 274 rz_dmac_ch_writel(channel, CHCTRL_SWRST, CHCTRL, 1);
5000d37042a61ca Biju Das 2021-08-06 275 rz_dmac_ch_writel(channel, chctrl, CHCTRL, 1);
5000d37042a61ca Biju Das 2021-08-06 276 }
5000d37042a61ca Biju Das 2021-08-06 277
5000d37042a61ca Biju Das 2021-08-06 278 local_irq_restore(flags);
5000d37042a61ca Biju Das 2021-08-06 279 }
5000d37042a61ca Biju Das 2021-08-06 280
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2021-12-30 3:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202112301019.TuIgtJix-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.