* drivers/vfio/fsl-mc/vfio_fsl_mc.c:79:21: warning: use of uninitialized value '<unknown>' [CWE-457]
@ 2022-08-14 14:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-14 14:44 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4867 bytes --]
::::::
:::::: Manual check reason: "low confidence bisect report"
:::::: Manual check reason: "low confidence static check warning: drivers/vfio/fsl-mc/vfio_fsl_mc.c:79:21: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]"
::::::
BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Diana Craciun <diana.craciun@oss.nxp.com>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: Laurentiu Tudor <laurentiu.tudor@nxp.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aea23e7c464bfdec04b52cf61edb62030e9e0d0a
commit: 8798a803ddf6329dc3b995775862b571db4909d2 vfio/fsl-mc: Add per device reset support
date: 11 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 11 months ago
config: arm-randconfig-c002-20220808 (https://download.01.org/0day-ci/archive/20220814/202208142248.XcwPK3kT-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8798a803ddf6329dc3b995775862b571db4909d2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8798a803ddf6329dc3b995775862b571db4909d2
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross ARCH=arm KBUILD_USERCFLAGS='-fanalyzer -Wno-error'
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
gcc-analyzer warnings: (new ones prefixed by >>)
drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_reset_device':
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:79:21: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
79 | u16 token;
| ^~~~~
'vfio_fsl_mc_reset_device': events 1-3
|
| 73 | if (is_fsl_mc_bus_dprc(vdev->mc_dev)) {
| | ^
| | |
| | (1) following 'false' branch...
|......
| 79 | u16 token;
| | ~~~~~
| | |
| | (2) ...to here
| | (3) use of uninitialized value '<unknown>' here
|
vim +79 drivers/vfio/fsl-mc/vfio_fsl_mc.c
df747bcd5b216d Diana Craciun 2020-10-05 67
8798a803ddf632 Diana Craciun 2021-09-22 68 static int vfio_fsl_mc_reset_device(struct vfio_fsl_mc_device *vdev)
8798a803ddf632 Diana Craciun 2021-09-22 69 {
8798a803ddf632 Diana Craciun 2021-09-22 70 struct fsl_mc_device *mc_dev = vdev->mc_dev;
8798a803ddf632 Diana Craciun 2021-09-22 71 int ret = 0;
8798a803ddf632 Diana Craciun 2021-09-22 72
8798a803ddf632 Diana Craciun 2021-09-22 73 if (is_fsl_mc_bus_dprc(vdev->mc_dev)) {
8798a803ddf632 Diana Craciun 2021-09-22 74 return dprc_reset_container(mc_dev->mc_io, 0,
8798a803ddf632 Diana Craciun 2021-09-22 75 mc_dev->mc_handle,
8798a803ddf632 Diana Craciun 2021-09-22 76 mc_dev->obj_desc.id,
8798a803ddf632 Diana Craciun 2021-09-22 77 DPRC_RESET_OPTION_NON_RECURSIVE);
8798a803ddf632 Diana Craciun 2021-09-22 78 } else {
8798a803ddf632 Diana Craciun 2021-09-22 @79 u16 token;
8798a803ddf632 Diana Craciun 2021-09-22 80
8798a803ddf632 Diana Craciun 2021-09-22 81 ret = fsl_mc_obj_open(mc_dev->mc_io, 0, mc_dev->obj_desc.id,
8798a803ddf632 Diana Craciun 2021-09-22 82 mc_dev->obj_desc.type,
8798a803ddf632 Diana Craciun 2021-09-22 83 &token);
8798a803ddf632 Diana Craciun 2021-09-22 84 if (ret)
8798a803ddf632 Diana Craciun 2021-09-22 85 goto out;
8798a803ddf632 Diana Craciun 2021-09-22 86 ret = fsl_mc_obj_reset(mc_dev->mc_io, 0, token);
8798a803ddf632 Diana Craciun 2021-09-22 87 if (ret) {
8798a803ddf632 Diana Craciun 2021-09-22 88 fsl_mc_obj_close(mc_dev->mc_io, 0, token);
8798a803ddf632 Diana Craciun 2021-09-22 89 goto out;
8798a803ddf632 Diana Craciun 2021-09-22 90 }
8798a803ddf632 Diana Craciun 2021-09-22 91 ret = fsl_mc_obj_close(mc_dev->mc_io, 0, token);
8798a803ddf632 Diana Craciun 2021-09-22 92 }
8798a803ddf632 Diana Craciun 2021-09-22 93 out:
8798a803ddf632 Diana Craciun 2021-09-22 94 return ret;
8798a803ddf632 Diana Craciun 2021-09-22 95 }
fb1ff4c1941573 Bharat Bhushan 2020-10-05 96
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-14 14:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-14 14:44 drivers/vfio/fsl-mc/vfio_fsl_mc.c:79:21: warning: use of uninitialized value '<unknown>' [CWE-457] 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.