mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	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-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [cxl:pending 27/33] drivers/cxl/acpi.c:293:2: warning: variable '__d' is uninitialized when used within its own initialization
Date: Tue, 26 Apr 2022 18:02:42 +0800	[thread overview]
Message-ID: <202204261758.lzXWne7H-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git pending
head:   ac33087b90d44498835ff3030e94357204ebaa31
commit: 66261e39a6ee0397eddc86efcaf6cf9ae8c8079b [27/33] cxl/acpi: Add root device lockdep validation
config: i386-randconfig-a002-20220425 (https://download.01.org/0day-ci/archive/20220426/202204261758.lzXWne7H-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 1cddcfdc3c683b393df1a5c9063252eb60e52818)
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=66261e39a6ee0397eddc86efcaf6cf9ae8c8079b
        git remote add cxl https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
        git fetch --no-tags cxl pending
        git checkout 66261e39a6ee0397eddc86efcaf6cf9ae8c8079b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/cxl/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/cxl/acpi.c:293:2: warning: variable '__d' is uninitialized when used within its own initialization [-Wuninitialized]
           device_lock_set_class(&pdev->dev, &cxl_root_key);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/device.h:876:26: note: expanded from macro 'device_lock_set_class'
           __device_lock_set_class(__d, #key, key);                           \
           ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   include/linux/device.h:855:38: note: expanded from macro '__device_lock_set_class'
           struct device *__d __maybe_unused = dev;                       \
                          ~~~                  ^~~
   1 warning generated.


vim +/__d +293 drivers/cxl/acpi.c

   284	
   285	static int cxl_acpi_probe(struct platform_device *pdev)
   286	{
   287		int rc;
   288		struct cxl_port *root_port;
   289		struct device *host = &pdev->dev;
   290		struct acpi_device *adev = ACPI_COMPANION(host);
   291		struct cxl_cfmws_context ctx;
   292	
 > 293		device_lock_set_class(&pdev->dev, &cxl_root_key);
   294		rc = devm_add_action_or_reset(&pdev->dev, cxl_acpi_lock_reset_class,
   295					      &pdev->dev);
   296		if (rc)
   297			return rc;
   298	
   299		root_port = devm_cxl_add_port(host, host, CXL_RESOURCE_NONE, NULL);
   300		if (IS_ERR(root_port))
   301			return PTR_ERR(root_port);
   302		dev_dbg(host, "add: %s\n", dev_name(&root_port->dev));
   303	
   304		rc = bus_for_each_dev(adev->dev.bus, NULL, root_port,
   305				      add_host_bridge_dport);
   306		if (rc < 0)
   307			return rc;
   308	
   309		ctx = (struct cxl_cfmws_context) {
   310			.dev = host,
   311			.root_port = root_port,
   312		};
   313		acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, cxl_parse_cfmws, &ctx);
   314	
   315		/*
   316		 * Root level scanned with host-bridge as dports, now scan host-bridges
   317		 * for their role as CXL uports to their CXL-capable PCIe Root Ports.
   318		 */
   319		rc = bus_for_each_dev(adev->dev.bus, NULL, root_port,
   320				      add_host_bridge_uport);
   321		if (rc < 0)
   322			return rc;
   323	
   324		if (IS_ENABLED(CONFIG_CXL_PMEM))
   325			rc = device_for_each_child(&root_port->dev, root_port,
   326						   add_root_nvdimm_bridge);
   327		if (rc < 0)
   328			return rc;
   329	
   330		/* In case PCI is scanned before ACPI re-trigger memdev attach */
   331		return cxl_bus_rescan();
   332	}
   333	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-04-26 10:27 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=202204261758.lzXWne7H-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=ben.widawsky@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ira.weiny@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@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

all inboxes | Powered by JetHome®