All of lore.kernel.org
 help / color / mirror / Atom feed
* [l1k:doe 8/23] drivers/cxl/core/pci.c:495:23: sparse: sparse: incorrect type in initializer (different base types)
@ 2023-01-31 13:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-01-31 13:46 UTC (permalink / raw)
  To: Lukas Wunner; +Cc: oe-kbuild-all

tree:   https://github.com/l1k/linux doe
head:   6d855ec241ff68e65ed7badd7658c3e6d56b8da7
commit: 5d86c9625529753b42f36555b97e54fb2ab47050 [8/23] cxl/pci: Use synchronous API for DOE
config: arc-randconfig-s031-20230131 (https://download.01.org/0day-ci/archive/20230131/202301312132.GzeygYUG-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/l1k/linux/commit/5d86c9625529753b42f36555b97e54fb2ab47050
        git remote add l1k https://github.com/l1k/linux
        git fetch --no-tags l1k doe
        git checkout 5d86c9625529753b42f36555b97e54fb2ab47050
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash drivers/cxl/core/

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

sparse warnings: (new ones prefixed by >>)
>> drivers/cxl/core/pci.c:495:23: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] request @@     got restricted __le32 [usertype] @@
   drivers/cxl/core/pci.c:495:23: sparse:     expected unsigned int [usertype] request
   drivers/cxl/core/pci.c:495:23: sparse:     got restricted __le32 [usertype]
   drivers/cxl/core/pci.c:510:19: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:510:19: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:510:19: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:510:19: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:510:19: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:510:19: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:525:31: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] request @@     got restricted __le32 [usertype] @@
   drivers/cxl/core/pci.c:525:31: sparse:     expected unsigned int [usertype] request
   drivers/cxl/core/pci.c:525:31: sparse:     got restricted __le32 [usertype]
   drivers/cxl/core/pci.c:546:43: sparse: sparse: cast to restricted __le16
   drivers/cxl/core/pci.c:546:43: sparse: sparse: cast to restricted __le16
   drivers/cxl/core/pci.c:546:43: sparse: sparse: cast to restricted __le16
   drivers/cxl/core/pci.c:546:43: sparse: sparse: cast to restricted __le16
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32
   drivers/cxl/core/pci.c:550:32: sparse: sparse: cast to restricted __le32

vim +495 drivers/cxl/core/pci.c

   483	
   484	#define CDAT_DOE_REQ(entry_handle) cpu_to_le32				\
   485		(FIELD_PREP(CXL_DOE_TABLE_ACCESS_REQ_CODE,			\
   486			    CXL_DOE_TABLE_ACCESS_REQ_CODE_READ) |		\
   487		 FIELD_PREP(CXL_DOE_TABLE_ACCESS_TABLE_TYPE,			\
   488			    CXL_DOE_TABLE_ACCESS_TABLE_TYPE_CDATA) |		\
   489		 FIELD_PREP(CXL_DOE_TABLE_ACCESS_ENTRY_HANDLE, (entry_handle)))
   490	
   491	static int cxl_cdat_get_length(struct device *dev,
   492				       struct pci_doe_mb *cdat_doe,
   493				       size_t *length)
   494	{
 > 495		u32 request = CDAT_DOE_REQ(0);
   496		u32 response[32];
   497		int rc;
   498	
   499		rc = pci_doe(cdat_doe, PCI_DVSEC_VENDOR_ID_CXL,
   500			     CXL_DOE_PROTOCOL_TABLE_ACCESS,
   501			     &request, sizeof(request),
   502			     &response, sizeof(response));
   503		if (rc < 0) {
   504			dev_err(dev, "DOE failed: %d", rc);
   505			return rc;
   506		}
   507		if (rc < 2 * sizeof(u32))
   508			return -EIO;
   509	
   510		*length = le32_to_cpu(response[1]);
   511		dev_dbg(dev, "CDAT length %zu\n", *length);
   512	
   513		return 0;
   514	}
   515	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

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

only message in thread, other threads:[~2023-01-31 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 13:46 [l1k:doe 8/23] drivers/cxl/core/pci.c:495:23: sparse: sparse: incorrect type in initializer (different base types) kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.