lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 26 Apr 2022 18:02:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        Alison Schofield <alison.schofield@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>,
        Ira Weiny <ira.weiny@...el.com>,
        Ben Widawsky <ben.widawsky@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [cxl:pending 27/33] drivers/cxl/acpi.c:293:2: warning: variable
 '__d' is uninitialized when used within its own initialization

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ