All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/cxl/core/port.c:331 cxl_root_decoder_visible() error: we previously assumed 'a' could be null (see line 327)
Date: Sun, 5 Nov 2023 17:15:26 +0800	[thread overview]
Message-ID: <202311051725.IRYFuC0N-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Dan Williams <dan.j.williams@intel.com>
CC: Vishal Verma <vishal.l.verma@intel.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
CC: Dave Jiang <dave.jiang@intel.com>
CC: Gregory Price <gregory.price@memverge.com>

Hi Dan,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   aea6bf908d730b01bd264a8821159db9463c111c
commit: 45d235c56b2bc51749af9cc8fe6ace18aa8b81be cxl/region: Enable CONFIG_CXL_REGION to be toggled
date:   9 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 9 months ago
config: x86_64-randconfig-161-20231104 (https://download.01.org/0day-ci/archive/20231105/202311051725.IRYFuC0N-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231105/202311051725.IRYFuC0N-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311051725.IRYFuC0N-lkp@intel.com/

smatch warnings:
drivers/cxl/core/port.c:331 cxl_root_decoder_visible() error: we previously assumed 'a' could be null (see line 327)

vim +/a +331 drivers/cxl/core/port.c

6e099264185d05 Dan Williams 2023-02-10  315  
779dd20cfb56c5 Ben Widawsky 2021-06-08  316  static umode_t cxl_root_decoder_visible(struct kobject *kobj, struct attribute *a, int n)
779dd20cfb56c5 Ben Widawsky 2021-06-08  317  {
779dd20cfb56c5 Ben Widawsky 2021-06-08  318  	struct device *dev = kobj_to_dev(kobj);
779dd20cfb56c5 Ben Widawsky 2021-06-08  319  	struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(dev);
779dd20cfb56c5 Ben Widawsky 2021-06-08  320  
779dd20cfb56c5 Ben Widawsky 2021-06-08  321  	if (a == CXL_REGION_ATTR(create_pmem_region) && !can_create_pmem(cxlrd))
779dd20cfb56c5 Ben Widawsky 2021-06-08  322  		return 0;
779dd20cfb56c5 Ben Widawsky 2021-06-08  323  
6e099264185d05 Dan Williams 2023-02-10  324  	if (a == CXL_REGION_ATTR(create_ram_region) && !can_create_ram(cxlrd))
6e099264185d05 Dan Williams 2023-02-10  325  		return 0;
6e099264185d05 Dan Williams 2023-02-10  326  
6e099264185d05 Dan Williams 2023-02-10 @327  	if (a == CXL_REGION_ATTR(delete_region) &&
6e099264185d05 Dan Williams 2023-02-10  328  	    !(can_create_pmem(cxlrd) || can_create_ram(cxlrd)))
779dd20cfb56c5 Ben Widawsky 2021-06-08  329  		return 0;
779dd20cfb56c5 Ben Widawsky 2021-06-08  330  
779dd20cfb56c5 Ben Widawsky 2021-06-08 @331  	return a->mode;
779dd20cfb56c5 Ben Widawsky 2021-06-08  332  }
779dd20cfb56c5 Ben Widawsky 2021-06-08  333  

:::::: The code at line 331 was first introduced by commit
:::::: 779dd20cfb56c510f89877cca45529fa9f8bc450 cxl/region: Add region creation support

:::::: TO: Ben Widawsky <bwidawsk@kernel.org>
:::::: CC: Dan Williams <dan.j.williams@intel.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2023-11-05  9:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-05  9:15 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-04 11:11 drivers/cxl/core/port.c:331 cxl_root_decoder_visible() error: we previously assumed 'a' could be null (see line 327) kernel test robot
2023-09-17  0:53 kernel test robot

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=202311051725.IRYFuC0N-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 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.