tree: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git controller/mediatek head: 2bee4c1a6fc0408242aedca80a102ef50c0dfbe5 commit: 2bee4c1a6fc0408242aedca80a102ef50c0dfbe5 [2/2] PCI: mediatek-gen3: Add support for restricting link width config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20241107/202411070226.YqavKDUD-lkp@xxxxxxxxx/config) compiler: alpha-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241107/202411070226.YqavKDUD-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202411070226.YqavKDUD-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): drivers/pci/controller/pcie-mediatek-gen3.c: In function 'mtk_pcie_parse_port': >> drivers/pci/controller/pcie-mediatek-gen3.c:898:14: error: implicit declaration of function 'of_property_read_u31'; did you mean 'of_property_read_u32'? [-Wimplicit-function-declaration] 898 | ret = of_property_read_u31(dev->of_node, "num-lanes", &num_lanes); | ^~~~~~~~~~~~~~~~~~~~ | of_property_read_u32 vim +898 drivers/pci/controller/pcie-mediatek-gen3.c 845 846 static int mtk_pcie_parse_port(struct mtk_gen3_pcie *pcie) 847 { 848 int i, ret, num_resets = pcie->soc->phy_resets.num_resets; 849 struct device *dev = pcie->dev; 850 struct platform_device *pdev = to_platform_device(dev); 851 struct resource *regs; 852 u32 num_lanes; 853 854 regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcie-mac"); 855 if (!regs) 856 return -EINVAL; 857 pcie->base = devm_ioremap_resource(dev, regs); 858 if (IS_ERR(pcie->base)) { 859 dev_err(dev, "failed to map register base\n"); 860 return PTR_ERR(pcie->base); 861 } 862 863 pcie->reg_base = regs->start; 864 865 for (i = 0; i < num_resets; i++) 866 pcie->phy_resets[i].id = pcie->soc->phy_resets.id[i]; 867 868 ret = devm_reset_control_bulk_get_optional_shared(dev, num_resets, pcie->phy_resets); 869 if (ret) { 870 dev_err(dev, "failed to get PHY bulk reset\n"); 871 return ret; 872 } 873 874 pcie->mac_reset = devm_reset_control_get_optional_exclusive(dev, "mac"); 875 if (IS_ERR(pcie->mac_reset)) { 876 ret = PTR_ERR(pcie->mac_reset); 877 if (ret != -EPROBE_DEFER) 878 dev_err(dev, "failed to get MAC reset\n"); 879 880 return ret; 881 } 882 883 pcie->phy = devm_phy_optional_get(dev, "pcie-phy"); 884 if (IS_ERR(pcie->phy)) { 885 ret = PTR_ERR(pcie->phy); 886 if (ret != -EPROBE_DEFER) 887 dev_err(dev, "failed to get PHY\n"); 888 889 return ret; 890 } 891 892 pcie->num_clks = devm_clk_bulk_get_all(dev, &pcie->clks); 893 if (pcie->num_clks < 0) { 894 dev_err(dev, "failed to get clocks\n"); 895 return pcie->num_clks; 896 } 897 > 898 ret = of_property_read_u31(dev->of_node, "num-lanes", &num_lanes); 899 if (ret == 0) { 900 if (num_lanes == 0 || num_lanes > 16 || (num_lanes != 1 && num_lanes % 2)) 901 dev_warn(dev, "invalid num-lanes, using controller defaults\n"); 902 else 903 pcie->num_lanes = num_lanes; 904 } 905 906 return 0; 907 } 908 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki