* [cxl:for-6.3/cxl-ram-region 14/18] drivers/cxl/core/region.c:1479:21: warning: variable 'rc' set but not used
@ 2023-01-28 3:45 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-01-28 3:45 UTC (permalink / raw)
To: Dan Williams
Cc: oe-kbuild-all, Alison Schofield, Vishal Verma, Ira Weiny,
Ben Widawsky, Dan Williams, linux-cxl
tree: https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git for-6.3/cxl-ram-region
head: a7cf664d7e997ac36b0f466af2e2be33464ab598
commit: d5c71004c2cb69354ab7f1bb9b0a33ae9f7edf9d [14/18] cxl/region: Refactor attach_target() for autodiscovery
config: alpha-randconfig-r024-20230123 (https://download.01.org/0day-ci/archive/20230128/202301281148.CS4njyXr-lkp@intel.com/config)
compiler: alpha-linux-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/cxl/cxl.git/commit/?id=d5c71004c2cb69354ab7f1bb9b0a33ae9f7edf9d
git remote add cxl https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
git fetch --no-tags cxl for-6.3/cxl-ram-region
git checkout d5c71004c2cb69354ab7f1bb9b0a33ae9f7edf9d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/cxl/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/cxl/core/region.c: In function 'store_targetN':
>> drivers/cxl/core/region.c:1479:21: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
1479 | int rc;
| ^~
vim +/rc +1479 drivers/cxl/core/region.c
1469
1470 static size_t store_targetN(struct cxl_region *cxlr, const char *buf, int pos,
1471 size_t len)
1472 {
1473 int rc;
1474
1475 if (sysfs_streq(buf, "\n"))
1476 rc = detach_target(cxlr, pos);
1477 else {
1478 struct device *dev;
> 1479 int rc;
1480
1481 dev = bus_find_device_by_name(&cxl_bus_type, NULL, buf);
1482 if (!dev)
1483 return -ENODEV;
1484
1485 if (!is_endpoint_decoder(dev)) {
1486 rc = -EINVAL;
1487 goto out;
1488 }
1489
1490 rc = attach_target(cxlr, to_cxl_endpoint_decoder(dev), pos,
1491 TASK_INTERRUPTIBLE);
1492 out:
1493 put_device(dev);
1494 }
1495
1496 if (rc < 0)
1497 return rc;
1498 return len;
1499 }
1500
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-28 3:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-28 3:45 [cxl:for-6.3/cxl-ram-region 14/18] drivers/cxl/core/region.c:1479:21: warning: variable 'rc' set but not used kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox