Hi Ravi, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Ravi-Gunasekaran/net-ethernet-ti-davinci_mdio-Add-workaround-for-errata-i2329/20220810-191718 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git f86d1fbbe7858884d6754534a0afbb74fc30bc26 config: arm-randconfig-r026-20220810 (https://download.01.org/0day-ci/archive/20220813/202208130814.216FrNfX-lkp@xxxxxxxxx/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 5f1c7e2cc5a3c07cbc2412e851a7283c1841f520) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/intel-lab-lkp/linux/commit/c62c93111418d5468f6add98d244f0a594dbe352 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Ravi-Gunasekaran/net-ethernet-ti-davinci_mdio-Add-workaround-for-errata-i2329/20220810-191718 git checkout c62c93111418d5468f6add98d244f0a594dbe352 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/net/ethernet/ti/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): >> drivers/net/ethernet/ti/davinci_mdio.c:548:37: error: use of undeclared identifier 'k3_mdio_socinfo' soc_match_data = soc_device_match(k3_mdio_socinfo); ^ >> drivers/net/ethernet/ti/davinci_mdio.c:553:31: error: incomplete definition of type 'struct k3_mdio_soc_data' data->manual_mode = socdata->manual_mode; ~~~~~~~^ drivers/net/ethernet/ti/davinci_mdio.c:550:17: note: forward declaration of 'struct k3_mdio_soc_data' const struct k3_mdio_soc_data *socdata = ^ 2 errors generated. vim +/k3_mdio_socinfo +548 drivers/net/ethernet/ti/davinci_mdio.c 528 529 static int davinci_mdio_probe(struct platform_device *pdev) 530 { 531 struct mdio_platform_data *pdata = dev_get_platdata(&pdev->dev); 532 struct device *dev = &pdev->dev; 533 struct davinci_mdio_data *data; 534 struct resource *res; 535 struct phy_device *phy; 536 int ret, addr; 537 int autosuspend_delay_ms = -1; 538 const struct soc_device_attribute *soc_match_data; 539 540 data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); 541 if (!data) 542 return -ENOMEM; 543 544 data->manual_mode = false; 545 data->bb_ctrl.ops = &davinci_mdiobb_ops; 546 547 if (IS_ENABLED(CONFIG_OF) && dev->of_node) { > 548 soc_match_data = soc_device_match(k3_mdio_socinfo); 549 if (soc_match_data && soc_match_data->data) { 550 const struct k3_mdio_soc_data *socdata = 551 soc_match_data->data; 552 > 553 data->manual_mode = socdata->manual_mode; 554 } 555 } 556 557 if (data->manual_mode) 558 data->bus = alloc_mdio_bitbang(&data->bb_ctrl); 559 else 560 data->bus = devm_mdiobus_alloc(dev); 561 562 if (!data->bus) { 563 dev_err(dev, "failed to alloc mii bus\n"); 564 return -ENOMEM; 565 } 566 567 if (IS_ENABLED(CONFIG_OF) && dev->of_node) { 568 const struct davinci_mdio_of_param *of_mdio_data; 569 570 ret = davinci_mdio_probe_dt(&data->pdata, pdev); 571 if (ret) 572 return ret; 573 snprintf(data->bus->id, MII_BUS_ID_SIZE, "%s", pdev->name); 574 575 of_mdio_data = of_device_get_match_data(&pdev->dev); 576 if (of_mdio_data) { 577 autosuspend_delay_ms = 578 of_mdio_data->autosuspend_delay_ms; 579 } 580 } else { 581 data->pdata = pdata ? (*pdata) : default_pdata; 582 snprintf(data->bus->id, MII_BUS_ID_SIZE, "%s-%x", 583 pdev->name, pdev->id); 584 } 585 586 data->bus->name = dev_name(dev); 587 588 if (data->manual_mode) { 589 data->bus->read = davinci_mdiobb_read; 590 data->bus->write = davinci_mdiobb_write; 591 data->bus->reset = davinci_mdiobb_reset; 592 593 dev_info(dev, "Configuring MDIO in manual mode\n"); 594 } else { 595 data->bus->read = davinci_mdio_read; 596 data->bus->write = davinci_mdio_write; 597 data->bus->reset = davinci_mdio_reset; 598 data->bus->priv = data; 599 } 600 data->bus->parent = dev; 601 602 data->clk = devm_clk_get(dev, "fck"); 603 if (IS_ERR(data->clk)) { 604 dev_err(dev, "failed to get device clock\n"); 605 return PTR_ERR(data->clk); 606 } 607 608 dev_set_drvdata(dev, data); 609 data->dev = dev; 610 611 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 612 if (!res) 613 return -EINVAL; 614 data->regs = devm_ioremap(dev, res->start, resource_size(res)); 615 if (!data->regs) 616 return -ENOMEM; 617 618 davinci_mdio_init_clk(data); 619 620 pm_runtime_set_autosuspend_delay(&pdev->dev, autosuspend_delay_ms); 621 pm_runtime_use_autosuspend(&pdev->dev); 622 pm_runtime_enable(&pdev->dev); 623 624 /* register the mii bus 625 * Create PHYs from DT only in case if PHY child nodes are explicitly 626 * defined to support backward compatibility with DTs which assume that 627 * Davinci MDIO will always scan the bus for PHYs detection. 628 */ 629 if (dev->of_node && of_get_child_count(dev->of_node)) 630 data->skip_scan = true; 631 632 ret = of_mdiobus_register(data->bus, dev->of_node); 633 if (ret) 634 goto bail_out; 635 636 /* scan and dump the bus */ 637 for (addr = 0; addr < PHY_MAX_ADDR; addr++) { 638 phy = mdiobus_get_phy(data->bus, addr); 639 if (phy) { 640 dev_info(dev, "phy[%d]: device %s, driver %s\n", 641 phy->mdio.addr, phydev_name(phy), 642 phy->drv ? phy->drv->name : "unknown"); 643 } 644 } 645 646 return 0; 647 648 bail_out: 649 pm_runtime_dont_use_autosuspend(&pdev->dev); 650 pm_runtime_disable(&pdev->dev); 651 return ret; 652 } 653 -- 0-DAY CI Kernel Test Service https://01.org/lkp