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]
Message-ID: <202207180002.aO1yUtRE-lkp@intel.com>
Date:   Mon, 18 Jul 2022 00:54:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     Gayatri Kammela <gayatri.kammela@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>,
        linux-kernel@...r.kernel.org,
        "David E. Box" <david.e.box@...ux.intel.com>,
        Mark Gross <markgross@...nel.org>,
        platform-driver-x86@...r.kernel.org
Subject: [pdx86-platform-drivers-x86:review-hans 66/93]
 drivers/platform/x86/intel/vsec.c:429:38: sparse: sparse: incorrect type in
 initializer (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-hans
head:   7a4a04f4e90d746928501a6d551de87d02c28323
commit: 936874b77dd0a86aafc1f03c11cb97ec938c16f1 [66/93] platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20220718/202207180002.aO1yUtRE-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?id=936874b77dd0a86aafc1f03c11cb97ec938c16f1
        git remote add pdx86-platform-drivers-x86 https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
        git fetch --no-tags pdx86-platform-drivers-x86 review-hans
        git checkout 936874b77dd0a86aafc1f03c11cb97ec938c16f1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/misc/lkdtm/ drivers/platform/x86/intel/ kernel/trace/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/intel/vsec.c:429:38: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted pci_channel_state_t [usertype] status @@     got restricted pci_ers_result_t @@
   drivers/platform/x86/intel/vsec.c:429:38: sparse:     expected restricted pci_channel_state_t [usertype] status
   drivers/platform/x86/intel/vsec.c:429:38: sparse:     got restricted pci_ers_result_t
>> drivers/platform/x86/intel/vsec.c:434:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted pci_channel_state_t [usertype] status @@     got restricted pci_ers_result_t @@
   drivers/platform/x86/intel/vsec.c:434:24: sparse:     expected restricted pci_channel_state_t [usertype] status
   drivers/platform/x86/intel/vsec.c:434:24: sparse:     got restricted pci_ers_result_t
>> drivers/platform/x86/intel/vsec.c:438:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted pci_ers_result_t @@     got restricted pci_channel_state_t [usertype] status @@
   drivers/platform/x86/intel/vsec.c:438:16: sparse:     expected restricted pci_ers_result_t
   drivers/platform/x86/intel/vsec.c:438:16: sparse:     got restricted pci_channel_state_t [usertype] status
   drivers/platform/x86/intel/vsec.c:444:38: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted pci_channel_state_t [usertype] status @@     got restricted pci_ers_result_t @@
   drivers/platform/x86/intel/vsec.c:444:38: sparse:     expected restricted pci_channel_state_t [usertype] status
   drivers/platform/x86/intel/vsec.c:444:38: sparse:     got restricted pci_ers_result_t
   drivers/platform/x86/intel/vsec.c:457:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted pci_channel_state_t [usertype] status @@     got restricted pci_ers_result_t @@
   drivers/platform/x86/intel/vsec.c:457:16: sparse:     expected restricted pci_channel_state_t [usertype] status
   drivers/platform/x86/intel/vsec.c:457:16: sparse:     got restricted pci_ers_result_t
   drivers/platform/x86/intel/vsec.c:472:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted pci_ers_result_t @@     got restricted pci_channel_state_t [usertype] status @@
   drivers/platform/x86/intel/vsec.c:472:16: sparse:     expected restricted pci_ers_result_t
   drivers/platform/x86/intel/vsec.c:472:16: sparse:     got restricted pci_channel_state_t [usertype] status
>> drivers/platform/x86/intel/vsec.c:480:33: sparse: sparse: symbol 'intel_vsec_pci_err_handlers' was not declared. Should it be static?


vim +429 drivers/platform/x86/intel/vsec.c

   425	
   426	static pci_ers_result_t intel_vsec_pci_error_detected(struct pci_dev *pdev,
   427							      pci_channel_state_t state)
   428	{
 > 429		pci_channel_state_t status = PCI_ERS_RESULT_NEED_RESET;
   430	
   431		dev_info(&pdev->dev, "PCI error detected, state %d", state);
   432	
   433		if (state == pci_channel_io_perm_failure)
 > 434			status = PCI_ERS_RESULT_DISCONNECT;
   435		else
   436			pci_disable_device(pdev);
   437	
 > 438		return status;
   439	}
   440	
   441	static pci_ers_result_t intel_vsec_pci_slot_reset(struct pci_dev *pdev)
   442	{
   443		struct intel_vsec_device *intel_vsec_dev;
 > 444		pci_channel_state_t status = PCI_ERS_RESULT_DISCONNECT;
   445		const struct pci_device_id *pci_dev_id;
   446		unsigned long index;
   447	
   448		dev_info(&pdev->dev, "Resetting PCI slot\n");
   449	
   450		msleep(2000);
   451		if (pci_enable_device(pdev)) {
   452			dev_info(&pdev->dev,
   453				 "Failed to re-enable PCI device after reset.\n");
   454			goto out;
   455		}
   456	
   457		status =  PCI_ERS_RESULT_RECOVERED;
   458	
   459		xa_for_each(&auxdev_array, index, intel_vsec_dev) {
   460			/* check if pdev doesn't match */
   461			if (pdev != intel_vsec_dev->pcidev)
   462				continue;
   463			devm_release_action(&pdev->dev, intel_vsec_remove_aux,
   464					    &intel_vsec_dev->auxdev);
   465		}
   466		pci_disable_device(pdev);
   467		pci_restore_state(pdev);
   468		pci_dev_id = pci_match_id(intel_vsec_pci_ids, pdev);
   469		intel_vsec_pci_probe(pdev, pci_dev_id);
   470	
   471	out:
   472		return status;
   473	}
   474	
   475	static void intel_vsec_pci_resume(struct pci_dev *pdev)
   476	{
   477		dev_info(&pdev->dev, "Done resuming PCI device\n");
   478	}
   479	
 > 480	const struct pci_error_handlers intel_vsec_pci_err_handlers = {
   481		.error_detected = intel_vsec_pci_error_detected,
   482		.slot_reset = intel_vsec_pci_slot_reset,
   483		.resume = intel_vsec_pci_resume,
   484	};
   485	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ