Linux CXL
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Ben Widawsky <ben.widawsky@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	linux-cxl@vger.kernel.org
Subject: [cxl:for-6.3/cxl-ram-region 14/18] drivers/cxl/core/region.c:1479:21: warning: variable 'rc' set but not used
Date: Sat, 28 Jan 2023 11:45:12 +0800	[thread overview]
Message-ID: <202301281148.CS4njyXr-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-01-28  3:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202301281148.CS4njyXr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=ben.widawsky@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox