tree: https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git pci/qcom head: bab406fc1147f27b9602d9e3c6d7a6edbee2ea16 commit: 64bb1ea81641fdcce4423e2672025e63ebe0bee4 [4/6] PCI: qcom: Replace ops with struct pcie_cfg in pcie match data config: csky-randconfig-s031-20211013 (attached as .config) compiler: csky-linux-gcc (GCC) 11.2.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-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/commit/?id=64bb1ea81641fdcce4423e2672025e63ebe0bee4 git remote add lpieralisi-pci https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git git fetch --no-tags lpieralisi-pci pci/qcom git checkout 64bb1ea81641fdcce4423e2672025e63ebe0bee4 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=csky If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) drivers/pci/controller/dwc/pcie-qcom.c: note: in included file (through include/linux/bitops.h, include/linux/kernel.h, include/linux/clk.h): arch/csky/include/asm/bitops.h:77:9: sparse: sparse: preprocessor token __clear_bit redefined drivers/pci/controller/dwc/pcie-qcom.c: note: in included file (through arch/csky/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h, ...): include/asm-generic/bitops/non-atomic.h:34:9: sparse: this was the original definition drivers/pci/controller/dwc/pcie-qcom.c:1319:30: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] bdf_be @@ got restricted __be16 [usertype] @@ drivers/pci/controller/dwc/pcie-qcom.c:1319:30: sparse: expected unsigned short [usertype] bdf_be drivers/pci/controller/dwc/pcie-qcom.c:1319:30: sparse: got restricted __be16 [usertype] >> drivers/pci/controller/dwc/pcie-qcom.c:1531:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected int @@ got void * @@ drivers/pci/controller/dwc/pcie-qcom.c:1531:24: sparse: expected int drivers/pci/controller/dwc/pcie-qcom.c:1531:24: sparse: got void * drivers/pci/controller/dwc/pcie-qcom.c: note: in included file (through arch/csky/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...): include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32 include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@ vim +1531 drivers/pci/controller/dwc/pcie-qcom.c 1499 1500 static int qcom_pcie_probe(struct platform_device *pdev) 1501 { 1502 struct device *dev = &pdev->dev; 1503 struct pcie_port *pp; 1504 struct dw_pcie *pci; 1505 struct qcom_pcie *pcie; 1506 const struct qcom_pcie_cfg *pcie_cfg; 1507 int ret; 1508 1509 pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); 1510 if (!pcie) 1511 return -ENOMEM; 1512 1513 pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); 1514 if (!pci) 1515 return -ENOMEM; 1516 1517 pm_runtime_enable(dev); 1518 ret = pm_runtime_get_sync(dev); 1519 if (ret < 0) 1520 goto err_pm_runtime_put; 1521 1522 pci->dev = dev; 1523 pci->ops = &dw_pcie_ops; 1524 pp = &pci->pp; 1525 1526 pcie->pci = pci; 1527 1528 pcie_cfg = of_device_get_match_data(dev); 1529 if (!pcie_cfg || !pcie_cfg->ops) { 1530 dev_err(dev, "Invalid platform data\n"); > 1531 return NULL; 1532 } 1533 1534 pcie->ops = pcie_cfg->ops; 1535 1536 pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH); 1537 if (IS_ERR(pcie->reset)) { 1538 ret = PTR_ERR(pcie->reset); 1539 goto err_pm_runtime_put; 1540 } 1541 1542 pcie->parf = devm_platform_ioremap_resource_byname(pdev, "parf"); 1543 if (IS_ERR(pcie->parf)) { 1544 ret = PTR_ERR(pcie->parf); 1545 goto err_pm_runtime_put; 1546 } 1547 1548 pcie->elbi = devm_platform_ioremap_resource_byname(pdev, "elbi"); 1549 if (IS_ERR(pcie->elbi)) { 1550 ret = PTR_ERR(pcie->elbi); 1551 goto err_pm_runtime_put; 1552 } 1553 1554 pcie->phy = devm_phy_optional_get(dev, "pciephy"); 1555 if (IS_ERR(pcie->phy)) { 1556 ret = PTR_ERR(pcie->phy); 1557 goto err_pm_runtime_put; 1558 } 1559 1560 ret = pcie->ops->get_resources(pcie); 1561 if (ret) 1562 goto err_pm_runtime_put; 1563 1564 pp->ops = &qcom_pcie_dw_ops; 1565 1566 ret = phy_init(pcie->phy); 1567 if (ret) { 1568 pm_runtime_disable(&pdev->dev); 1569 goto err_pm_runtime_put; 1570 } 1571 1572 platform_set_drvdata(pdev, pcie); 1573 1574 ret = dw_pcie_host_init(pp); 1575 if (ret) { 1576 dev_err(dev, "cannot initialize host\n"); 1577 pm_runtime_disable(&pdev->dev); 1578 goto err_pm_runtime_put; 1579 } 1580 1581 return 0; 1582 1583 err_pm_runtime_put: 1584 pm_runtime_put(dev); 1585 pm_runtime_disable(dev); 1586 1587 return ret; 1588 } 1589 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org