Hi Dave,
I love your patch! Perhaps something to improve:
[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on v5.13-rc2]
[cannot apply to next-20210521]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Dave-Jiang/Fix-idxd-sub-drivers-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: x86_64-randconfig-a005-20210523 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
e84a9b9bb3051c35dea993cdad7b3d2575638f85)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
#
https://github.com/0day-ci/linux/commit/42d79fbe271bbc2b3790fc938d6e024a4...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Dave-Jiang/Fix-idxd-sub-drivers-setup/20210522-230724
git checkout 42d79fbe271bbc2b3790fc938d6e024a430700e8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/dma/idxd/device.c:1267:6: warning: variable 'rc'
is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/idxd/device.c:1270:6: note: uninitialized use occurs here
if (rc < 0)
^~
drivers/dma/idxd/device.c:1267:2: note: remove the 'if' if its condition is
always true
if (test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/idxd/device.c:1255:8: note: initialize the variable 'rc' to silence
this warning
int rc;
^
= 0
1 warning generated.
vim +1267 drivers/dma/idxd/device.c
1250
1251 int idxd_device_drv_probe(struct idxd_dev *idxd_dev)
1252 {
1253 struct idxd_device *idxd = idxd_dev_to_idxd(idxd_dev);
1254 unsigned long flags;
1255 int rc;
1256
1257 /*
1258 * Device should be in disabled state for the idxd_drv to load. If it's in
1259 * enabled state, then the device was altered outside of driver's control.
1260 * If the state is in halted state, then we don't want to proceed.
1261 */
1262 if (idxd->state != IDXD_DEV_DISABLED)
1263 return -ENXIO;
1264
1265 /* Device configuration */
1266 spin_lock_irqsave(&idxd->dev_lock, flags);
1267 if (test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org