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: <202111091221.zolqAOmH-lkp@intel.com>
Date:   Tue, 9 Nov 2021 12:14:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/pci/pci.c:1029:24: sparse: sparse: incorrect type in return
 expression (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d2f38a3c6507b2520101f9a3807ed98f1bdc545a
commit: d5b0d88385f5a5f865f6761d7c93e373221914a4 PCI: PM: Do not use pci_platform_pm_ops for Intel MID PM
date:   6 weeks ago
config: i386-randconfig-s031-20210929 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5b0d88385f5a5f865f6761d7c93e373221914a4
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d5b0d88385f5a5f865f6761d7c93e373221914a4
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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


sparse warnings: (new ones prefixed by >>)
   drivers/pci/pci.c:1078:13: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1078:21: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1078:31: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1078:39: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1087:35: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1087:54: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1088:19: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1088:37: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1118:23: sparse: sparse: invalid assignment: |=
   drivers/pci/pci.c:1118:23: sparse:    left side has type unsigned short
   drivers/pci/pci.c:1118:23: sparse:    right side has type restricted pci_power_t
   drivers/pci/pci.c:1123:57: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1145:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted pci_power_t [usertype] current_state @@     got int @@
   drivers/pci/pci.c:1145:28: sparse:     expected restricted pci_power_t [usertype] current_state
   drivers/pci/pci.c:1145:28: sparse:     got int
   drivers/pci/pci.c:1194:36: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted pci_power_t [usertype] current_state @@     got int @@
   drivers/pci/pci.c:1194:36: sparse:     expected restricted pci_power_t [usertype] current_state
   drivers/pci/pci.c:1194:36: sparse:     got int
   drivers/pci/pci.c:1366:13: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1366:21: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1368:18: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1368:26: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1391:13: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1391:22: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1398:46: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1398:54: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:1756:38: sparse: sparse: array of flexible structures
   drivers/pci/pci.c:2335:44: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:2643:60: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:2644:30: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:2837:20: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:2837:38: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:2860:49: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:2860:67: sparse: sparse: restricted pci_power_t degrades to integer
   drivers/pci/pci.c:4789:13: sparse: sparse: invalid assignment: |=
   drivers/pci/pci.c:4789:13: sparse:    left side has type unsigned short
   drivers/pci/pci.c:4789:13: sparse:    right side has type restricted pci_power_t
   drivers/pci/pci.c:4794:13: sparse: sparse: invalid assignment: |=
   drivers/pci/pci.c:4794:13: sparse:    left side has type unsigned short
   drivers/pci/pci.c:4794:13: sparse:    right side has type restricted pci_power_t
>> drivers/pci/pci.c:1029:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected int @@     got restricted pci_power_t [usertype] @@
   drivers/pci/pci.c:1029:24: sparse:     expected int
   drivers/pci/pci.c:1029:24: sparse:     got restricted pci_power_t [usertype]
>> drivers/pci/pci.c:1029:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected int @@     got restricted pci_power_t [usertype] @@
   drivers/pci/pci.c:1029:24: sparse:     expected int
   drivers/pci/pci.c:1029:24: sparse:     got restricted pci_power_t [usertype]

vim +1029 drivers/pci/pci.c

  1025	
  1026	static inline int platform_pci_set_wakeup(struct pci_dev *dev, bool enable)
  1027	{
  1028		if (pci_use_mid_pm())
> 1029			return PCI_POWER_ERROR;
  1030	
  1031		return pci_platform_pm ?
  1032				pci_platform_pm->set_wakeup(dev, enable) : -ENODEV;
  1033	}
  1034	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (32945 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ