public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-pci@vger.kernel.org,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Fei Shao" <fshao@chromium.org>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>
Subject: [pci:controller/mediatek 2/2] drivers/pci/controller/pcie-mediatek-gen3.c:898:14: error: call to undeclared function 'of_property_read_u31'; ISO C99 and later do not support implicit function declarations
Date: Thu, 7 Nov 2024 04:19:10 +0800	[thread overview]
Message-ID: <202411070452.OBJPnFbT-lkp@intel.com> (raw)

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: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241107/202411070452.OBJPnFbT-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241107/202411070452.OBJPnFbT-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411070452.OBJPnFbT-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/pci/controller/pcie-mediatek-gen3.c:22:
   In file included from include/linux/pci.h:1650:
   In file included from include/linux/dmapool.h:14:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/controller/pcie-mediatek-gen3.c:898:14: error: call to undeclared function 'of_property_read_u31'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     898 |        ret = of_property_read_u31(dev->of_node, "num-lanes", &num_lanes);
         |              ^
   drivers/pci/controller/pcie-mediatek-gen3.c:898:14: note: did you mean 'of_property_read_u32'?
   include/linux/of.h:1412:19: note: 'of_property_read_u32' declared here
    1412 | static inline int of_property_read_u32(const struct device_node *np,
         |                   ^
   4 warnings and 1 error generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for MODVERSIONS
   Depends on [n]: MODULES [=y] && !COMPILE_TEST [=y]
   Selected by [y]:
   - RANDSTRUCT_FULL [=y] && (CC_HAS_RANDSTRUCT [=y] || GCC_PLUGINS [=n]) && MODULES [=y]


vim +/of_property_read_u31 +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

                 reply	other threads:[~2024-11-06 20:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202411070452.OBJPnFbT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=fshao@chromium.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox