* drivers/ata/pata_bk3710.c:179:4: warning: Value stored to 'mode' is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-02-28 3:37 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-28 3:37 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 20064 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Damien Le Moal <damien.lemoal@opensource.wdc.com>
CC: Hannes Reinecke <hare@suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3
commit: a3d11c275b647b5b56b907011b432e00f7ddb683 ata: pata_bk3710: add compile test support
date: 6 weeks ago
:::::: branch date: 5 hours ago
:::::: commit date: 6 weeks ago
config: riscv-randconfig-c006-20220222 (https://download.01.org/0day-ci/archive/20220228/202202281101.3f4VBVa7-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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=a3d11c275b647b5b56b907011b432e00f7ddb683
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a3d11c275b647b5b56b907011b432e00f7ddb683
# 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/w1/slaves/w1_ds2438.c:69:3: note: Value stored to 'crc' is never read
crc = 0;
^ ~
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.
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.
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.
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.
10 warnings generated.
fs/gfs2/recovery.c:397:2: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores]
error = update_statfs_inode(jd, NULL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/gfs2/recovery.c:397:2: note: Value stored to 'error' is never read
error = update_statfs_inode(jd, NULL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:137:13: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
__list_del(entry->prev, entry->next);
^
fs/gfs2/recovery.c:113:2: note: Loop condition is true. Entering loop body
while (!list_empty(head)) {
^
fs/gfs2/recovery.c:116:3: note: Memory is released
kfree(rr);
^~~~~~~~~
fs/gfs2/recovery.c:113:2: note: Loop condition is true. Entering loop body
while (!list_empty(head)) {
^
fs/gfs2/recovery.c:115:3: note: Calling 'list_del'
list_del(&rr->rr_list);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:148:2: note: Calling '__list_del_entry'
__list_del_entry(entry);
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:134:6: note: Assuming the condition is false
if (!__list_del_entry_valid(entry))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:134:2: note: Taking false branch
if (!__list_del_entry_valid(entry))
^
include/linux/list.h:137:13: note: Use of memory after it is freed
__list_del(entry->prev, entry->next);
^~~~~~~~~~~
include/linux/list.h:149:14: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
entry->next = LIST_POISON1;
^
fs/gfs2/recovery.c:113:2: note: Loop condition is true. Entering loop body
while (!list_empty(head)) {
^
fs/gfs2/recovery.c:116:3: note: Memory is released
kfree(rr);
^~~~~~~~~
fs/gfs2/recovery.c:113:2: note: Loop condition is true. Entering loop body
while (!list_empty(head)) {
^
fs/gfs2/recovery.c:115:3: note: Calling 'list_del'
list_del(&rr->rr_list);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:149:14: note: Use of memory after it is freed
entry->next = LIST_POISON1;
~~~~~~~~~~~ ^
Suppressed 7 warnings (7 in non-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.
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/ata/pata_ali.c:126:10: warning: Although the value stored to 'mask' is used in the enclosing expression, the value is never actually read from 'mask' [clang-analyzer-deadcode.DeadStores]
return mask &= ~ATA_MASK_UDMA;
^ ~~~~~~~~~~~~~~
drivers/ata/pata_ali.c:126:10: note: Although the value stored to 'mask' is used in the enclosing expression, the value is never actually read from 'mask'
return mask &= ~ATA_MASK_UDMA;
^ ~~~~~~~~~~~~~~
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/ata/pata_amd.c:280:9: warning: Although the value stored to 'saved_udma' is used in the enclosing expression, the value is never actually read from 'saved_udma' [clang-analyzer-deadcode.DeadStores]
udma = saved_udma = (unsigned long)ap->host->private_data;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/pata_amd.c:280:9: note: Although the value stored to 'saved_udma' is used in the enclosing expression, the value is never actually read from 'saved_udma'
udma = saved_udma = (unsigned long)ap->host->private_data;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/ata/pata_bk3710.c:179:4: warning: Value stored to 'mode' is never read [clang-analyzer-deadcode.DeadStores]
mode = mode2;
^ ~~~~~
drivers/ata/pata_bk3710.c:179:4: note: Value stored to 'mode' is never read
mode = mode2;
^ ~~~~~
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.
11 warnings generated.
drivers/media/i2c/hi846.c:1494:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/hi846.c:1494:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/hi846.c:1764:2: warning: Value stored to 'tgt_fps' is never read [clang-analyzer-deadcode.DeadStores]
tgt_fps = hi846->cur_mode->fps;
^ ~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/hi846.c:1764:2: note: Value stored to 'tgt_fps' is never read
tgt_fps = hi846->cur_mode->fps;
^ ~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/hi846.c:1805:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/hi846.c:1805:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
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.
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.
Suppressed 7 warnings (7 in non-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.
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.
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.
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.
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.
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.
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.
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.
Suppressed 7 warnings (7 in non-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.
drivers/media/i2c/ad9389b.c:399:7: warning: Value stored to 'N' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
u32 N = (ad9389b_rd(sd, 0x01) & 0xf) << 16 |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ad9389b.c:399:7: note: Value stored to 'N' during its initialization is never read
u32 N = (ad9389b_rd(sd, 0x01) & 0xf) << 16 |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 (8 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.
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.
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.
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.
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.
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.
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.
vim +/mode +179 drivers/ata/pata_bk3710.c
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 148
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 149 static void pata_bk3710_setpiomode(void __iomem *base, struct ata_device *pair,
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 150 unsigned int dev, unsigned int cycletime,
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 151 unsigned int mode)
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 152 {
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 153 const struct ata_timing *t;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 154 u32 val32;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 155 u8 t2, t2i, t0;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 156
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 157 t = ata_timing_find_mode(XFER_PIO_0 + mode);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 158
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 159 /* PIO Data Setup */
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 160 t0 = DIV_ROUND_UP(cycletime, ideclk_period);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 161 t2 = DIV_ROUND_UP(t->active, ideclk_period);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 162
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 163 t2i = t0 - t2 - 1;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 164 t2--;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 165
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 166 val32 = ioread32(base + BK3710_DATSTB) & (0xFF << (dev ? 0 : 8));
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 167 val32 |= t2 << (dev ? 8 : 0);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 168 iowrite32(val32, base + BK3710_DATSTB);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 169
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 170 val32 = ioread32(base + BK3710_DATRCVR) & (0xFF << (dev ? 0 : 8));
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 171 val32 |= t2i << (dev ? 8 : 0);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 172 iowrite32(val32, base + BK3710_DATRCVR);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 173
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 174 /* FIXME: this is broken also in the old driver */
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 175 if (pair) {
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 176 u8 mode2 = pair->pio_mode - XFER_PIO_0;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 177
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 178 if (mode2 < mode)
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 @179 mode = mode2;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 180 }
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 181
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 182 /* TASKFILE Setup */
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 183 t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 184 t2 = DIV_ROUND_UP(t->act8b, ideclk_period);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 185
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 186 t2i = t0 - t2 - 1;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 187 t2--;
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 188
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 189 val32 = ioread32(base + BK3710_REGSTB) & (0xFF << (dev ? 0 : 8));
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 190 val32 |= t2 << (dev ? 8 : 0);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 191 iowrite32(val32, base + BK3710_REGSTB);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 192
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 193 val32 = ioread32(base + BK3710_REGRCVR) & (0xFF << (dev ? 0 : 8));
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 194 val32 |= t2i << (dev ? 8 : 0);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 195 iowrite32(val32, base + BK3710_REGRCVR);
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 196 }
76a40ca82f3498 Bartlomiej Zolnierkiewicz 2017-03-22 197
:::::: The code@line 179 was first introduced by commit
:::::: 76a40ca82f3498da2683b3d5efa9b24d5ffaeecc ata: add Palmchip BK3710 PATA controller driver
:::::: TO: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
:::::: CC: Sekhar Nori <nsekhar@ti.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
* drivers/ata/pata_bk3710.c:179:4: warning: Value stored to 'mode' is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-03-15 13:56 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-03-15 13:56 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 17598 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Damien Le Moal <damien.lemoal@opensource.wdc.com>
CC: Hannes Reinecke <hare@suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9
commit: a3d11c275b647b5b56b907011b432e00f7ddb683 ata: pata_bk3710: add compile test support
date: 9 weeks ago
:::::: branch date: 2 days ago
:::::: commit date: 9 weeks ago
config: arm-randconfig-c002-20220312 (https://download.01.org/0day-ci/archive/20220315/202203152104.IXpB2wHf-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6)
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=a3d11c275b647b5b56b907011b432e00f7ddb683
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a3d11c275b647b5b56b907011b432e00f7ddb683
# 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 >>)
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.
1 warning generated.
Suppressed 1 warnings (1 in non-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/crypto/hifn_795x.c:598:8: warning: Excessive padding in 'struct hifn_crypto_alg' (52 padding bytes, where 20 is optimal).
Optimal fields order:
alg,
dev,
entry,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct hifn_crypto_alg {
~~~~~~~^~~~~~~~~~~~~~~~~
drivers/crypto/hifn_795x.c:598:8: note: Excessive padding in 'struct hifn_crypto_alg' (52 padding bytes, where 20 is optimal). Optimal fields order: alg, dev, entry, consider reordering the fields or adding explicit padding members
struct hifn_crypto_alg {
~~~~~~~^~~~~~~~~~~~~~~~~
drivers/crypto/hifn_795x.c:1103:3: warning: Null pointer passed as 2nd argument to memory copy function [clang-analyzer-unix.cstring.NullArg]
memcpy(buf_pos, iv, ivsize);
^
drivers/crypto/hifn_795x.c:1125:2: note: Control jumps to 'case 1:' at line 1129
switch (rctx->op) {
^
drivers/crypto/hifn_795x.c:1131:3: note: Execution continues on line 1139
break;
^
drivers/crypto/hifn_795x.c:1142:12: note: Field 'op' is equal to ACRYPTO_OP_ENCRYPT
if (rctx->op == ACRYPTO_OP_ENCRYPT || rctx->op == ACRYPTO_OP_DECRYPT) {
^
drivers/crypto/hifn_795x.c:1142:37: note: Left side of '||' is true
if (rctx->op == ACRYPTO_OP_ENCRYPT || rctx->op == ACRYPTO_OP_DECRYPT) {
^
drivers/crypto/hifn_795x.c:1145:7: note: Assuming field 'keysize' is not equal to 0
if (ctx->keysize)
^~~~~~~~~~~~
drivers/crypto/hifn_795x.c:1145:3: note: Taking true branch
if (ctx->keysize)
^
drivers/crypto/hifn_795x.c:1147:7: note: Assuming field 'iv' is null
if (rctx->iv && rctx->mode != ACRYPTO_MODE_ECB)
^~~~~~~~
drivers/crypto/hifn_795x.c:1147:16: note: Left side of '&&' is false
if (rctx->iv && rctx->mode != ACRYPTO_MODE_ECB)
^
drivers/crypto/hifn_795x.c:1150:3: note: Control jumps to 'case 3:' at line 1160
switch (rctx->mode) {
^
drivers/crypto/hifn_795x.c:1162:4: note: Execution continues on line 1167
break;
^
drivers/crypto/hifn_795x.c:1167:3: note: Control jumps to 'case 4:' at line 1191
switch (rctx->type) {
^
drivers/crypto/hifn_795x.c:1192:8: note: Assuming field 'keysize' is equal to 8
if (ctx->keysize != 8)
^~~~~~~~~~~~~~~~~
drivers/crypto/hifn_795x.c:1192:4: note: Taking false branch
if (ctx->keysize != 8)
^
drivers/crypto/hifn_795x.c:1195:4: note: Execution continues on line 1200
break;
^
drivers/crypto/hifn_795x.c:1202:5: note: Passing null pointer value via 7th parameter 'iv'
rctx->iv, rctx->ivsize, md);
^~~~~~~~
drivers/crypto/hifn_795x.c:1200:14: note: Calling 'hifn_setup_crypto_command'
buf_pos += hifn_setup_crypto_command(dev, buf_pos,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/crypto/hifn_795x.c:1093:6: note: Assuming field 'cmdu' is <= 1
if (dma->cmdu > 1) {
^~~~~~~~~~~~~
drivers/crypto/hifn_795x.c:1093:2: note: Taking false branch
if (dma->cmdu > 1) {
^
drivers/crypto/hifn_795x.c:1098:6: note: 'keylen' is 8
if (keylen) {
^~~~~~
drivers/crypto/hifn_795x.c:1098:2: note: Taking true branch
if (keylen) {
^
drivers/crypto/hifn_795x.c:1102:6: note: Assuming 'ivsize' is not equal to 0
if (ivsize) {
^~~~~~
drivers/crypto/hifn_795x.c:1102:2: note: Taking true branch
if (ivsize) {
^
drivers/crypto/hifn_795x.c:1103:3: note: Null pointer passed as 2nd argument to memory copy function
memcpy(buf_pos, iv, ivsize);
^ ~~
drivers/crypto/hifn_795x.c:1124:2: warning: Value stored to 'mask' is never read [clang-analyzer-deadcode.DeadStores]
mask = 0;
^ ~
drivers/crypto/hifn_795x.c:1124:2: note: Value stored to 'mask' is never read
mask = 0;
^ ~
Suppressed 7 warnings (7 in non-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/ata/pata_bk3710.c:179:4: warning: Value stored to 'mode' is never read [clang-analyzer-deadcode.DeadStores]
mode = mode2;
^ ~~~~~
drivers/ata/pata_bk3710.c:179:4: note: Value stored to 'mode' is never read
mode = mode2;
^ ~~~~~
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.
23 warnings generated.
net/socket.c:585:3: warning: Value stored to 'buffer' is never read [clang-analyzer-deadcode.DeadStores]
buffer += len;
^ ~~~
net/socket.c:585:3: note: Value stored to 'buffer' is never read
buffer += len;
^ ~~~
net/socket.c:644:6: warning: Access to field 'ops' results in a dereference of a null pointer (loaded from variable 'sock') [clang-analyzer-core.NullDereference]
if (sock->ops) {
^
net/socket.c:3419:6: note: Assuming 'err' is >= 0
if (err < 0)
^~~~~~~
net/socket.c:3419:2: note: Taking false branch
if (err < 0)
^
net/socket.c:3423:6: note: Assuming 'err' is < 0
if (err < 0) {
^~~~~~~
net/socket.c:3423:2: note: Taking true branch
if (err < 0) {
^
net/socket.c:3424:16: note: Passing null pointer value via 1st parameter 'sock'
sock_release(*newsock);
^~~~~~~~
net/socket.c:3424:3: note: Calling 'sock_release'
sock_release(*newsock);
^~~~~~~~~~~~~~~~~~~~~~
net/socket.c:677:17: note: Passing null pointer value via 1st parameter 'sock'
__sock_release(sock, NULL);
^~~~
net/socket.c:677:2: note: Calling '__sock_release'
__sock_release(sock, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~
net/socket.c:644:6: note: Access to field 'ops' results in a dereference of a null pointer (loaded from variable 'sock')
if (sock->ops) {
^~~~
net/socket.c:1561:9: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
return sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK));
^
net/socket.c:1564:1: note: Calling '__do_sys_socket'
SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol)
^
include/linux/syscalls.h:219:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/syscalls.h:228:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/syscalls.h:249:14: note: expanded from macro '__SYSCALL_DEFINEx'
long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: expanded from here
net/socket.c:1566:9: note: Calling '__sys_socket'
return __sys_socket(family, type, protocol);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/socket.c:1540:2: note: 'sock' declared without an initial value
struct socket *sock;
^~~~~~~~~~~~~~~~~~~
net/socket.c:1544:15: note: 524288 is equal to 524288
BUILD_BUG_ON(SOCK_CLOEXEC != O_CLOEXEC);
^
include/linux/net.h:77:22: note: expanded from macro 'SOCK_CLOEXEC'
#define SOCK_CLOEXEC O_CLOEXEC
^~~~~~~~~
include/uapi/asm-generic/fcntl.h:63:19: note: expanded from macro 'O_CLOEXEC'
#define O_CLOEXEC 02000000 /* set close_on_exec */
^~~~~~~~
include/linux/build_bug.h:50:19: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:335:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:323:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:315:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/socket.c:1544:2: note: Taking false branch
BUILD_BUG_ON(SOCK_CLOEXEC != O_CLOEXEC);
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
vim +/mode +179 drivers/ata/pata_bk3710.c
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 148
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 149 static void pata_bk3710_setpiomode(void __iomem *base, struct ata_device *pair,
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 150 unsigned int dev, unsigned int cycletime,
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 151 unsigned int mode)
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 152 {
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 153 const struct ata_timing *t;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 154 u32 val32;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 155 u8 t2, t2i, t0;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 156
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 157 t = ata_timing_find_mode(XFER_PIO_0 + mode);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 158
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 159 /* PIO Data Setup */
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 160 t0 = DIV_ROUND_UP(cycletime, ideclk_period);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 161 t2 = DIV_ROUND_UP(t->active, ideclk_period);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 162
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 163 t2i = t0 - t2 - 1;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 164 t2--;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 165
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 166 val32 = ioread32(base + BK3710_DATSTB) & (0xFF << (dev ? 0 : 8));
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 167 val32 |= t2 << (dev ? 8 : 0);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 168 iowrite32(val32, base + BK3710_DATSTB);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 169
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 170 val32 = ioread32(base + BK3710_DATRCVR) & (0xFF << (dev ? 0 : 8));
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 171 val32 |= t2i << (dev ? 8 : 0);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 172 iowrite32(val32, base + BK3710_DATRCVR);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 173
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 174 /* FIXME: this is broken also in the old driver */
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 175 if (pair) {
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 176 u8 mode2 = pair->pio_mode - XFER_PIO_0;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 177
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 178 if (mode2 < mode)
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 @179 mode = mode2;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 180 }
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 181
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 182 /* TASKFILE Setup */
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 183 t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 184 t2 = DIV_ROUND_UP(t->act8b, ideclk_period);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 185
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 186 t2i = t0 - t2 - 1;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 187 t2--;
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 188
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 189 val32 = ioread32(base + BK3710_REGSTB) & (0xFF << (dev ? 0 : 8));
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 190 val32 |= t2 << (dev ? 8 : 0);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 191 iowrite32(val32, base + BK3710_REGSTB);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 192
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 193 val32 = ioread32(base + BK3710_REGRCVR) & (0xFF << (dev ? 0 : 8));
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 194 val32 |= t2i << (dev ? 8 : 0);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 195 iowrite32(val32, base + BK3710_REGRCVR);
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 196 }
76a40ca82f3498d Bartlomiej Zolnierkiewicz 2017-03-22 197
:::::: The code@line 179 was first introduced by commit
:::::: 76a40ca82f3498da2683b3d5efa9b24d5ffaeecc ata: add Palmchip BK3710 PATA controller driver
:::::: TO: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
:::::: CC: Sekhar Nori <nsekhar@ti.com>
---
0-DAY CI Kernel Test Service
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:[~2022-03-15 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28 3:37 drivers/ata/pata_bk3710.c:179:4: warning: Value stored to 'mode' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-03-15 13:56 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.