mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [cxl:pending 27/33] drivers/cxl/acpi.c:293:2: warning: variable '__d' is uninitialized when used within its own initialization
@ 2022-04-26 10:02 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-26 10:02 UTC (permalink / raw)
  To: Dan Williams
  Cc: llvm, kbuild-all, Alison Schofield, Vishal Verma, Ira Weiny,
	Ben Widawsky, Dan Williams, linux-kernel, Greg Kroah-Hartman

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-26 10:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 10:02 [cxl:pending 27/33] drivers/cxl/acpi.c:293:2: warning: variable '__d' is uninitialized when used within its own initialization 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

all inboxes | Powered by JetHome®