* drivers/cxl/pmem.c:143:7: warning: Value stored to 'rc' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-02-22 16:52 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-22 16:52 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 15712 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Dan Williams <dan.j.williams@intel.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 038101e6b2cd5c55f888f85db42ea2ad3aecb4b6
commit: 21083f51521fb0f60dbac591f175c3ed48435af4 cxl/pmem: Register 'pmem' / cxl_nvdimm devices
date: 8 months ago
:::::: branch date: 24 hours ago
:::::: commit date: 8 months ago
config: riscv-randconfig-c006-20220221 (https://download.01.org/0day-ci/archive/20220223/202202230052.LcyF8IAG-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=21083f51521fb0f60dbac591f175c3ed48435af4
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 21083f51521fb0f60dbac591f175c3ed48435af4
# 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 >>)
^
fs/jfs/jfs_dtree.c:787:2: note: Assuming the condition is true
DT_PUTPAGE(mp);
^
fs/jfs/jfs_dtree.c:131:24: note: expanded from macro 'DT_PUTPAGE'
#define DT_PUTPAGE(MP) BT_PUTPAGE(MP)
^~~~~~~~~~~~~~
fs/jfs/jfs_btree.h:87:8: note: expanded from macro 'BT_PUTPAGE'
if (! BT_IS_ROOT(MP)) \
^~~~~~~~~~~~~~
fs/jfs/jfs_btree.h:47:25: note: expanded from macro 'BT_IS_ROOT'
#define BT_IS_ROOT(MP) (((MP)->xflag & COMMIT_PAGE) == 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/jfs/jfs_dtree.c:787:2: note: Taking false branch
DT_PUTPAGE(mp);
^
fs/jfs/jfs_dtree.c:131:24: note: expanded from macro 'DT_PUTPAGE'
#define DT_PUTPAGE(MP) BT_PUTPAGE(MP)
^
fs/jfs/jfs_btree.h:87:2: note: expanded from macro 'BT_PUTPAGE'
if (! BT_IS_ROOT(MP)) \
^
fs/jfs/jfs_dtree.c:4528:12: note: Returning from 'dtSearch'
if ((rc = dtSearch(ip, key, orig_ino, &btstack, flag)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/jfs/jfs_dtree.c:4528:7: note: Assuming 'rc' is 0
if ((rc = dtSearch(ip, key, orig_ino, &btstack, flag)))
^~
fs/jfs/jfs_dtree.c:4528:2: note: Taking false branch
if ((rc = dtSearch(ip, key, orig_ino, &btstack, flag)))
^
fs/jfs/jfs_dtree.c:4532:2: note: Assigned value is garbage or undefined
DT_GETSEARCH(ip, btstack.top, bn, mp, p, index);
^
fs/jfs/jfs_dtree.c:134:2: note: expanded from macro 'DT_GETSEARCH'
BT_GETSEARCH(IP, LEAF, BN, MP, dtpage_t, P, INDEX, i_dtroot)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/jfs/jfs_btree.h:144:5: note: expanded from macro 'BT_GETSEARCH'
BN = (LEAF)->bn;\
^ ~~~~~~~~~~
fs/jfs/jfs_types.h:67:33: warning: The left operand of '&' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
pxd->len_addr = (pxd->len_addr & cpu_to_le32(0xffffff)) |
^
fs/jfs/jfs_dtree.c:946:7: note: Assuming the condition is false
sp = DT_PAGE(ip, smp);
^
fs/jfs/jfs_dtree.c:111:25: note: expanded from macro 'DT_PAGE'
#define DT_PAGE(IP, MP) BT_PAGE(IP, MP, dtpage_t, i_dtroot)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/jfs/jfs_btree.h:51:3: note: expanded from macro 'BT_PAGE'
(BT_IS_ROOT(MP) ? (TYPE *)&JFS_IP(IP)->ROOT : (TYPE *)(MP)->data)
^~~~~~~~~~~~~~
fs/jfs/jfs_btree.h:47:25: note: expanded from macro 'BT_IS_ROOT'
#define BT_IS_ROOT(MP) (((MP)->xflag & COMMIT_PAGE) == 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/jfs/jfs_dtree.c:946:7: note: '?' condition is false
sp = DT_PAGE(ip, smp);
^
fs/jfs/jfs_dtree.c:111:25: note: expanded from macro 'DT_PAGE'
#define DT_PAGE(IP, MP) BT_PAGE(IP, MP, dtpage_t, i_dtroot)
^
fs/jfs/jfs_btree.h:51:3: note: expanded from macro 'BT_PAGE'
(BT_IS_ROOT(MP) ? (TYPE *)&JFS_IP(IP)->ROOT : (TYPE *)(MP)->data)
^
fs/jfs/jfs_btree.h:47:24: note: expanded from macro 'BT_IS_ROOT'
#define BT_IS_ROOT(MP) (((MP)->xflag & COMMIT_PAGE) == 0)
^
fs/jfs/jfs_dtree.c:949:6: note: Assuming field 'name' is non-null
if (!key.name) {
^~~~~~~~~
fs/jfs/jfs_dtree.c:949:2: note: Taking false branch
if (!key.name) {
^
fs/jfs/jfs_dtree.c:964:6: note: Assuming the condition is true
if (sp->header.flag & BT_ROOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~
fs/jfs/jfs_dtree.c:964:2: note: Taking true branch
if (sp->header.flag & BT_ROOT) {
^
fs/jfs/jfs_dtree.c:972:7: note: Assuming 'n' is > field 'nslot'
if (n <= split->nslot)
^~~~~~~~~~~~~~~~~
fs/jfs/jfs_dtree.c:972:3: note: Taking false branch
if (n <= split->nslot)
^
fs/jfs/jfs_dtree.c:974:8: note: Assuming 'rc' is 0
if ((rc = dbAlloc(ip, 0, (s64) xlen, &xaddr))) {
^~
fs/jfs/jfs_dtree.c:974:3: note: Taking false branch
if ((rc = dbAlloc(ip, 0, (s64) xlen, &xaddr))) {
^
fs/jfs/jfs_dtree.c:982:3: note: Calling 'PXDaddress'
PXDaddress(pxd, xaddr);
^~~~~~~~~~~~~~~~~~~~~~
fs/jfs/jfs_types.h:67:33: note: The left operand of '&' is a garbage value
pxd->len_addr = (pxd->len_addr & cpu_to_le32(0xffffff)) |
~~~~~~~~~~~~~ ^
Suppressed 9 warnings (2 in non-user code, 7 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.
10 warnings generated.
>> drivers/cxl/pmem.c:143:7: warning: Value stored to 'rc' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
int rc = bus_rescan_devices(&cxl_bus_type);
^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/cxl/pmem.c:143:7: note: Value stored to 'rc' during its initialization is never read
int rc = bus_rescan_devices(&cxl_bus_type);
^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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.
14 warnings generated.
drivers/ata/libata-core.c:92:8: warning: Excessive padding in 'struct ata_force_param' (12 padding bytes, where 4 is optimal).
Optimal fields order:
name,
xfer_mask,
horkage_on,
horkage_off,
lflags,
cbl,
spd_limit,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct ata_force_param {
~~~~~~~^~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:92:8: note: Excessive padding in 'struct ata_force_param' (12 padding bytes, where 4 is optimal). Optimal fields order: name, xfer_mask, horkage_on, horkage_off, lflags, cbl, spd_limit, consider reordering the fields or adding explicit padding members
struct ata_force_param {
~~~~~~~^~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:4544:7: warning: Access to field 'ap' results in a dereference of a null pointer (loaded from variable 'qc') [clang-analyzer-core.NullDereference]
ap = qc->ap;
^~
drivers/ata/libata-core.c:4543:15: note: Assuming 'qc' is equal to null
WARN_ON_ONCE(qc == NULL); /* ata_qc_from_tag _might_ return NULL */
^
include/asm-generic/bug.h:201:41: note: expanded from macro 'WARN_ON_ONCE'
#define WARN_ON_ONCE(condition) WARN_ON(condition)
~~~~~~~~^~~~~~~~~~
include/asm-generic/bug.h:188:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/ata/libata-core.c:4544:7: note: Access to field 'ap' results in a dereference of a null pointer (loaded from variable 'qc')
ap = qc->ap;
^~
drivers/ata/libata-core.c:5454:18: warning: Access to field 'pio_mask' results in a dereference of a null pointer (loaded from variable 'pi') [clang-analyzer-core.NullDereference]
ap->pio_mask = pi->pio_mask;
^~
drivers/ata/libata-core.c:5445:6: note: Assuming 'host' is non-null
if (!host)
^~~~~
drivers/ata/libata-core.c:5445:2: note: Taking false branch
if (!host)
^
drivers/ata/libata-core.c:5448:21: note: Null pointer value stored to 'pi'
for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) {
^~~~~~~~~
drivers/ata/libata-core.c:5448:32: note: Assuming 'i' is < field 'n_ports'
for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) {
^~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5448:2: note: Loop condition is true. Entering loop body
for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) {
^
drivers/ata/libata-core.c:5451:7: note: Assuming the condition is false
if (ppi[j])
^~~~~~
drivers/ata/libata-core.c:5451:3: note: Taking false branch
if (ppi[j])
^
drivers/ata/libata-core.c:5454:18: note: Access to field 'pio_mask' results in a dereference of a null pointer (loaded from variable 'pi')
ap->pio_mask = pi->pio_mask;
^~
drivers/ata/libata-core.c:5576:6: warning: Access to field 'host_stop' results in a dereference of a null pointer (loaded from field 'ops') [clang-analyzer-core.NullDereference]
if (host->ops->host_stop)
^
drivers/ata/libata-core.c:5823:7: note: Calling 'ata_host_start'
rc = ata_host_start(host);
^~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5559:6: note: Assuming the condition is false
if (host->flags & ATA_HOST_STARTED)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5559:2: note: Taking false branch
if (host->flags & ATA_HOST_STARTED)
^
drivers/ata/libata-core.c:5564:14: note: Assuming 'i' is < field 'n_ports'
for (i = 0; i < host->n_ports; i++) {
^~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5564:2: note: Loop condition is true. Entering loop body
for (i = 0; i < host->n_ports; i++) {
^
drivers/ata/libata-core.c:5569:7: note: Assuming field 'ops' is null
if (!host->ops && !ata_port_is_dummy(ap))
^~~~~~~~~~
drivers/ata/libata-core.c:5569:7: note: Assuming pointer value is null
if (!host->ops && !ata_port_is_dummy(ap))
^~~~~~~~~~
drivers/ata/libata-core.c:5569:7: note: Left side of '&&' is true
drivers/ata/libata-core.c:5569:21: note: Assuming the condition is false
if (!host->ops && !ata_port_is_dummy(ap))
^~~~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5569:3: note: Taking false branch
if (!host->ops && !ata_port_is_dummy(ap))
^
drivers/ata/libata-core.c:5572:7: note: Assuming field 'port_stop' is null
if (ap->ops->port_stop)
^~~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5572:3: note: Taking false branch
vim +/rc +143 drivers/cxl/pmem.c
8fdcb1704f61a8 Dan Williams 2021-06-15 112
8fdcb1704f61a8 Dan Williams 2021-06-15 113 static void cxl_nvb_update_state(struct work_struct *work)
8fdcb1704f61a8 Dan Williams 2021-06-15 114 {
8fdcb1704f61a8 Dan Williams 2021-06-15 115 struct cxl_nvdimm_bridge *cxl_nvb =
8fdcb1704f61a8 Dan Williams 2021-06-15 116 container_of(work, typeof(*cxl_nvb), state_work);
21083f51521fb0 Dan Williams 2021-06-15 117 struct nvdimm_bus *victim_bus = NULL;
21083f51521fb0 Dan Williams 2021-06-15 118 bool release = false, rescan = false;
8fdcb1704f61a8 Dan Williams 2021-06-15 119
8fdcb1704f61a8 Dan Williams 2021-06-15 120 device_lock(&cxl_nvb->dev);
8fdcb1704f61a8 Dan Williams 2021-06-15 121 switch (cxl_nvb->state) {
8fdcb1704f61a8 Dan Williams 2021-06-15 122 case CXL_NVB_ONLINE:
8fdcb1704f61a8 Dan Williams 2021-06-15 123 if (!online_nvdimm_bus(cxl_nvb)) {
8fdcb1704f61a8 Dan Williams 2021-06-15 124 dev_err(&cxl_nvb->dev,
8fdcb1704f61a8 Dan Williams 2021-06-15 125 "failed to establish nvdimm bus\n");
8fdcb1704f61a8 Dan Williams 2021-06-15 126 release = true;
21083f51521fb0 Dan Williams 2021-06-15 127 } else
21083f51521fb0 Dan Williams 2021-06-15 128 rescan = true;
8fdcb1704f61a8 Dan Williams 2021-06-15 129 break;
8fdcb1704f61a8 Dan Williams 2021-06-15 130 case CXL_NVB_OFFLINE:
8fdcb1704f61a8 Dan Williams 2021-06-15 131 case CXL_NVB_DEAD:
21083f51521fb0 Dan Williams 2021-06-15 132 victim_bus = cxl_nvb->nvdimm_bus;
21083f51521fb0 Dan Williams 2021-06-15 133 cxl_nvb->nvdimm_bus = NULL;
8fdcb1704f61a8 Dan Williams 2021-06-15 134 break;
8fdcb1704f61a8 Dan Williams 2021-06-15 135 default:
8fdcb1704f61a8 Dan Williams 2021-06-15 136 break;
8fdcb1704f61a8 Dan Williams 2021-06-15 137 }
8fdcb1704f61a8 Dan Williams 2021-06-15 138 device_unlock(&cxl_nvb->dev);
8fdcb1704f61a8 Dan Williams 2021-06-15 139
8fdcb1704f61a8 Dan Williams 2021-06-15 140 if (release)
8fdcb1704f61a8 Dan Williams 2021-06-15 141 device_release_driver(&cxl_nvb->dev);
21083f51521fb0 Dan Williams 2021-06-15 142 if (rescan) {
21083f51521fb0 Dan Williams 2021-06-15 @143 int rc = bus_rescan_devices(&cxl_bus_type);
21083f51521fb0 Dan Williams 2021-06-15 144
21083f51521fb0 Dan Williams 2021-06-15 145 dev_dbg(&cxl_nvb->dev, "rescan: %d\n", rc);
21083f51521fb0 Dan Williams 2021-06-15 146 }
21083f51521fb0 Dan Williams 2021-06-15 147 offline_nvdimm_bus(victim_bus);
8fdcb1704f61a8 Dan Williams 2021-06-15 148
8fdcb1704f61a8 Dan Williams 2021-06-15 149 put_device(&cxl_nvb->dev);
8fdcb1704f61a8 Dan Williams 2021-06-15 150 }
8fdcb1704f61a8 Dan Williams 2021-06-15 151
---
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/cxl/pmem.c:143:7: warning: Value stored to 'rc' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-02-23 9:05 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-23 9:05 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 15893 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Dan Williams <dan.j.williams@intel.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5c1ee569660d4a205dced9cb4d0306b907fb7599
commit: 21083f51521fb0f60dbac591f175c3ed48435af4 cxl/pmem: Register 'pmem' / cxl_nvdimm devices
date: 8 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 8 months ago
config: riscv-randconfig-c006-20220221 (https://download.01.org/0day-ci/archive/20220223/202202231738.Itk7u3I6-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=21083f51521fb0f60dbac591f175c3ed48435af4
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 21083f51521fb0f60dbac591f175c3ed48435af4
# 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/bluetooth/btusb.c:2869:6: note: 'err' is 0
if (err)
^~~
drivers/bluetooth/btusb.c:2869:2: note: Taking false branch
if (err)
^
drivers/bluetooth/btusb.c:2874:8: note: Calling 'btusb_setup_intel_new_get_fw_name'
err = btusb_setup_intel_new_get_fw_name(&ver, ¶ms, ddcname,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btusb.c:2414:2: note: Control jumps to 'case 12:' at line 2416
switch (ver->hw_variant) {
^
drivers/bluetooth/btusb.c:2417:3: note: 5th function call argument is an uninitialized value
snprintf(fw_name, len, "intel/ibt-%u-%u.%s",
^
drivers/bluetooth/btusb.c:3717:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = btusb_mtk_setup_firmware_79xx(hdev, fw_bin_name);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btusb.c:3717:3: note: Value stored to 'err' is never read
err = btusb_mtk_setup_firmware_79xx(hdev, fw_bin_name);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 11 warnings (4 in non-user code, 7 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.
12 warnings generated.
fs/nilfs2/btree.c:377:2: warning: Value stored to 'flags' is never read [clang-analyzer-deadcode.DeadStores]
flags = nilfs_btree_node_get_flags(node);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nilfs2/btree.c:377:2: note: Value stored to 'flags' is never read
flags = nilfs_btree_node_get_flags(node);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nilfs2/btree.c:1430:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = 0;
^ ~
fs/nilfs2/btree.c:1430:2: note: Value stored to 'ret' is never read
ret = 0;
^ ~
fs/nilfs2/btree.c:2332:7: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
if (!buffer_dirty(bh))
^ ~~
fs/nilfs2/btree.c:2312:2: note: 'bh' declared without an initial value
struct buffer_head *bh;
^~~~~~~~~~~~~~~~~~~~~~
fs/nilfs2/btree.c:2318:6: note: Assuming 'path' is not equal to NULL
if (path == NULL)
^~~~~~~~~~~~
fs/nilfs2/btree.c:2318:2: note: Taking false branch
if (path == NULL)
^
fs/nilfs2/btree.c:2322:6: note: 'ret' is >= 0
if (ret < 0) {
^~~
fs/nilfs2/btree.c:2322:2: note: Taking false branch
if (ret < 0) {
^
fs/nilfs2/btree.c:2326:8: note: Calling 'nilfs_btree_get_block'
ret = nilfs_btree_get_block(btree, ptr, &bh);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nilfs2/btree.c:532:9: note: Calling '__nilfs_btree_get_block'
return __nilfs_btree_get_block(btree, ptr, bhp, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nilfs2/btree.c:480:6: note: Assuming 'ret' is not equal to 0
if (ret) {
^~~
fs/nilfs2/btree.c:480:2: note: Taking true branch
if (ret) {
^
fs/nilfs2/btree.c:481:7: note: Assuming the condition is true
if (ret != -EEXIST)
^~~~~~~~~~~~~~
fs/nilfs2/btree.c:481:3: note: Taking true branch
if (ret != -EEXIST)
^
fs/nilfs2/btree.c:482:4: note: Returning without writing to '*bhp'
return ret;
^
fs/nilfs2/btree.c:532:9: note: Returning from '__nilfs_btree_get_block'
return __nilfs_btree_get_block(btree, ptr, bhp, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nilfs2/btree.c:532:2: note: Returning without writing to '*bhp'
return __nilfs_btree_get_block(btree, ptr, bhp, NULL);
^
fs/nilfs2/btree.c:2326:8: note: Returning from 'nilfs_btree_get_block'
ret = nilfs_btree_get_block(btree, ptr, &bh);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nilfs2/btree.c:2327:6: note: Assuming 'ret' is >= 0
if (ret < 0) {
^~~~~~~
fs/nilfs2/btree.c:2327:2: note: Taking false branch
if (ret < 0) {
^
fs/nilfs2/btree.c:2332:7: note: 1st function call argument is an uninitialized value
if (!buffer_dirty(bh))
^ ~~
Suppressed 9 warnings (2 in non-user code, 7 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.
9 warnings generated.
Suppressed 9 warnings (2 in non-user code, 7 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.
10 warnings generated.
>> drivers/cxl/pmem.c:143:7: warning: Value stored to 'rc' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
int rc = bus_rescan_devices(&cxl_bus_type);
^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/cxl/pmem.c:143:7: note: Value stored to 'rc' during its initialization is never read
int rc = bus_rescan_devices(&cxl_bus_type);
^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (2 in non-user code, 7 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.
14 warnings generated.
drivers/ata/libata-core.c:92:8: warning: Excessive padding in 'struct ata_force_param' (12 padding bytes, where 4 is optimal).
Optimal fields order:
name,
xfer_mask,
horkage_on,
horkage_off,
lflags,
cbl,
spd_limit,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct ata_force_param {
~~~~~~~^~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:92:8: note: Excessive padding in 'struct ata_force_param' (12 padding bytes, where 4 is optimal). Optimal fields order: name, xfer_mask, horkage_on, horkage_off, lflags, cbl, spd_limit, consider reordering the fields or adding explicit padding members
struct ata_force_param {
~~~~~~~^~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:4544:7: warning: Access to field 'ap' results in a dereference of a null pointer (loaded from variable 'qc') [clang-analyzer-core.NullDereference]
ap = qc->ap;
^~
drivers/ata/libata-core.c:4543:15: note: Assuming 'qc' is equal to null
WARN_ON_ONCE(qc == NULL); /* ata_qc_from_tag _might_ return NULL */
^
include/asm-generic/bug.h:201:41: note: expanded from macro 'WARN_ON_ONCE'
#define WARN_ON_ONCE(condition) WARN_ON(condition)
~~~~~~~~^~~~~~~~~~
include/asm-generic/bug.h:188:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/ata/libata-core.c:4544:7: note: Access to field 'ap' results in a dereference of a null pointer (loaded from variable 'qc')
ap = qc->ap;
^~
drivers/ata/libata-core.c:5454:18: warning: Access to field 'pio_mask' results in a dereference of a null pointer (loaded from variable 'pi') [clang-analyzer-core.NullDereference]
ap->pio_mask = pi->pio_mask;
^~
drivers/ata/libata-core.c:5445:6: note: Assuming 'host' is non-null
if (!host)
^~~~~
drivers/ata/libata-core.c:5445:2: note: Taking false branch
if (!host)
^
drivers/ata/libata-core.c:5448:21: note: Null pointer value stored to 'pi'
for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) {
^~~~~~~~~
drivers/ata/libata-core.c:5448:32: note: Assuming 'i' is < field 'n_ports'
for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) {
^~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5448:2: note: Loop condition is true. Entering loop body
for (i = 0, j = 0, pi = NULL; i < host->n_ports; i++) {
^
drivers/ata/libata-core.c:5451:7: note: Assuming the condition is false
if (ppi[j])
^~~~~~
drivers/ata/libata-core.c:5451:3: note: Taking false branch
if (ppi[j])
^
drivers/ata/libata-core.c:5454:18: note: Access to field 'pio_mask' results in a dereference of a null pointer (loaded from variable 'pi')
ap->pio_mask = pi->pio_mask;
^~
drivers/ata/libata-core.c:5576:6: warning: Access to field 'host_stop' results in a dereference of a null pointer (loaded from field 'ops') [clang-analyzer-core.NullDereference]
if (host->ops->host_stop)
^
drivers/ata/libata-core.c:5823:7: note: Calling 'ata_host_start'
rc = ata_host_start(host);
^~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5559:6: note: Assuming the condition is false
if (host->flags & ATA_HOST_STARTED)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5559:2: note: Taking false branch
if (host->flags & ATA_HOST_STARTED)
^
drivers/ata/libata-core.c:5564:14: note: Assuming 'i' is < field 'n_ports'
for (i = 0; i < host->n_ports; i++) {
^~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5564:2: note: Loop condition is true. Entering loop body
for (i = 0; i < host->n_ports; i++) {
^
drivers/ata/libata-core.c:5569:7: note: Assuming field 'ops' is null
if (!host->ops && !ata_port_is_dummy(ap))
^~~~~~~~~~
drivers/ata/libata-core.c:5569:7: note: Assuming pointer value is null
if (!host->ops && !ata_port_is_dummy(ap))
^~~~~~~~~~
drivers/ata/libata-core.c:5569:7: note: Left side of '&&' is true
drivers/ata/libata-core.c:5569:21: note: Assuming the condition is false
if (!host->ops && !ata_port_is_dummy(ap))
^~~~~~~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5569:3: note: Taking false branch
if (!host->ops && !ata_port_is_dummy(ap))
^
drivers/ata/libata-core.c:5572:7: note: Assuming field 'port_stop' is null
if (ap->ops->port_stop)
^~~~~~~~~~~~~~~~~~
drivers/ata/libata-core.c:5572:3: note: Taking false branch
vim +/rc +143 drivers/cxl/pmem.c
8fdcb1704f61a8 Dan Williams 2021-06-15 112
8fdcb1704f61a8 Dan Williams 2021-06-15 113 static void cxl_nvb_update_state(struct work_struct *work)
8fdcb1704f61a8 Dan Williams 2021-06-15 114 {
8fdcb1704f61a8 Dan Williams 2021-06-15 115 struct cxl_nvdimm_bridge *cxl_nvb =
8fdcb1704f61a8 Dan Williams 2021-06-15 116 container_of(work, typeof(*cxl_nvb), state_work);
21083f51521fb0 Dan Williams 2021-06-15 117 struct nvdimm_bus *victim_bus = NULL;
21083f51521fb0 Dan Williams 2021-06-15 118 bool release = false, rescan = false;
8fdcb1704f61a8 Dan Williams 2021-06-15 119
8fdcb1704f61a8 Dan Williams 2021-06-15 120 device_lock(&cxl_nvb->dev);
8fdcb1704f61a8 Dan Williams 2021-06-15 121 switch (cxl_nvb->state) {
8fdcb1704f61a8 Dan Williams 2021-06-15 122 case CXL_NVB_ONLINE:
8fdcb1704f61a8 Dan Williams 2021-06-15 123 if (!online_nvdimm_bus(cxl_nvb)) {
8fdcb1704f61a8 Dan Williams 2021-06-15 124 dev_err(&cxl_nvb->dev,
8fdcb1704f61a8 Dan Williams 2021-06-15 125 "failed to establish nvdimm bus\n");
8fdcb1704f61a8 Dan Williams 2021-06-15 126 release = true;
21083f51521fb0 Dan Williams 2021-06-15 127 } else
21083f51521fb0 Dan Williams 2021-06-15 128 rescan = true;
8fdcb1704f61a8 Dan Williams 2021-06-15 129 break;
8fdcb1704f61a8 Dan Williams 2021-06-15 130 case CXL_NVB_OFFLINE:
8fdcb1704f61a8 Dan Williams 2021-06-15 131 case CXL_NVB_DEAD:
21083f51521fb0 Dan Williams 2021-06-15 132 victim_bus = cxl_nvb->nvdimm_bus;
21083f51521fb0 Dan Williams 2021-06-15 133 cxl_nvb->nvdimm_bus = NULL;
8fdcb1704f61a8 Dan Williams 2021-06-15 134 break;
8fdcb1704f61a8 Dan Williams 2021-06-15 135 default:
8fdcb1704f61a8 Dan Williams 2021-06-15 136 break;
8fdcb1704f61a8 Dan Williams 2021-06-15 137 }
8fdcb1704f61a8 Dan Williams 2021-06-15 138 device_unlock(&cxl_nvb->dev);
8fdcb1704f61a8 Dan Williams 2021-06-15 139
8fdcb1704f61a8 Dan Williams 2021-06-15 140 if (release)
8fdcb1704f61a8 Dan Williams 2021-06-15 141 device_release_driver(&cxl_nvb->dev);
21083f51521fb0 Dan Williams 2021-06-15 142 if (rescan) {
21083f51521fb0 Dan Williams 2021-06-15 @143 int rc = bus_rescan_devices(&cxl_bus_type);
21083f51521fb0 Dan Williams 2021-06-15 144
21083f51521fb0 Dan Williams 2021-06-15 145 dev_dbg(&cxl_nvb->dev, "rescan: %d\n", rc);
21083f51521fb0 Dan Williams 2021-06-15 146 }
21083f51521fb0 Dan Williams 2021-06-15 147 offline_nvdimm_bus(victim_bus);
8fdcb1704f61a8 Dan Williams 2021-06-15 148
8fdcb1704f61a8 Dan Williams 2021-06-15 149 put_device(&cxl_nvb->dev);
8fdcb1704f61a8 Dan Williams 2021-06-15 150 }
8fdcb1704f61a8 Dan Williams 2021-06-15 151
---
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:[~2022-02-23 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-22 16:52 drivers/cxl/pmem.c:143:7: warning: Value stored to 'rc' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-02-23 9:05 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.