Skip to contentSkip to conversation

drivers/phy/phy-spacemit-k1-pcie.c:299: undefined reference to `devm_clk_hw_register'

PATCH kernel test robot 1 participant 1 message Dec 25, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git next
head:   27287e3b52b5954b73203d32ee76ffd5f53f5074
commit: 57e920b92724dd568526990c04e79ed54241c5fc [13/81] phy: spacemit: Introduce PCIe/combo PHY
config: sparc-randconfig-r131-20251225 (https://download.01.org/0day-ci/archive/20251225/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251225/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

sparc64-linux-ld: drivers/phy/phy-spacemit-k1-pcie.o: in function `k1_pcie_phy_pll_setup':

>> drivers/phy/phy-spacemit-k1-pcie.c:299: undefined reference to `devm_clk_hw_register'
>> sparc64-linux-ld: drivers/phy/phy-spacemit-k1-pcie.c:306: undefined reference to `devm_clk_hw_get_clk'

vim +299 drivers/phy/phy-spacemit-k1-pcie.c

278
279 /* We represent the PHY PLL as a private clock */
280 static int k1_pcie_phy_pll_setup(struct k1_pcie_phy *k1_phy)
281 {
282 struct clk_hw *hw = &k1_phy->pll_hw;
283 struct device *dev = k1_phy->dev;
284 struct clk_init_data init = { };
285 char *name;
286 int ret;
287
288 name = kasprintf(GFP_KERNEL, "pcie%u_phy_pll", k1_phy->phy->id);
289 if (!name)
290 return -ENOMEM;
291
292 init.name = name;
293 init.ops = &k1_pcie_phy_pll_ops;
294 init.parent_data = k1_pcie_phy_data;
295 init.num_parents = ARRAY_SIZE(k1_pcie_phy_data);
296
297 hw->init = &init;
298

 > 299		ret = devm_clk_hw_register(dev, hw);
   300	
   301		kfree(name);	/* __clk_register() duplicates the name we provide */
   302	
   303		if (ret)
   304			return ret;
   305	
 > 306		k1_phy->pll = devm_clk_hw_get_clk(dev, hw, "pll");

307 if (IS_ERR(k1_phy->pll))
308 return PTR_ERR(k1_phy->pll);
309
310 return 0;
311 }
312

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki