* [freescale-fslc:pr/428 14380/20799] drivers/regulator/pca9450-regulator.c:678:16: error: 'pca9450_matches' undeclared
@ 2021-08-28 22:38 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-28 22:38 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 11036 bytes --]
Hi Jindong,
First bad commit (maybe != root cause):
tree: https://github.com/Freescale/linux-fslc pr/428
head: 49ef8ef4cd120f04cd5b4f05fdf89fdfce961505
commit: d29c65632f73063945b8ab29a5634573959e8539 [14380/20799] MA-17597-2 mfd: pca9450: Support module build
config: i386-randconfig-r031-20210829 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Freescale/linux-fslc/commit/d29c65632f73063945b8ab29a5634573959e8539
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/428
git checkout d29c65632f73063945b8ab29a5634573959e8539
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/mfd/ drivers/regulator/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/regulator/pca9450-regulator.c: In function 'pca9450_probe':
>> drivers/regulator/pca9450-regulator.c:678:16: error: 'pca9450_matches' undeclared (first use in this function)
678 | desc->name = pca9450_matches[i].name;
| ^~~~~~~~~~~~~~~
drivers/regulator/pca9450-regulator.c:678:16: note: each undeclared identifier is reported only once for each function it appears in
At top level:
drivers/regulator/pca9450-regulator.c:149:44: warning: 'pca9450_ldo2_voltage_ranges' defined but not used [-Wunused-const-variable=]
149 | static const struct regulator_linear_range pca9450_ldo2_voltage_ranges[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
drivers/mfd/pca9450.c: In function 'pca9450_i2c_probe':
>> drivers/mfd/pca9450.c:206:20: error: implicit declaration of function 'pca9450_parse_dt' [-Werror=implicit-function-declaration]
206 | pmic_plat_data = pca9450_parse_dt(i2c, &chip_id);
| ^~~~~~~~~~~~~~~~
>> drivers/mfd/pca9450.c:206:18: warning: assignment to 'struct pca9450_board *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
206 | pmic_plat_data = pca9450_parse_dt(i2c, &chip_id);
| ^
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for IMX_IRQSTEER
Depends on ARCH_MXC || COMPILE_TEST
Selected by
- DRM_IMX_DCSS && HAS_IOMEM
vim +/pca9450_matches +678 drivers/regulator/pca9450-regulator.c
c46712e52a8dd0 Robin Gong 2019-10-23 634
c46712e52a8dd0 Robin Gong 2019-10-23 635 /*
c46712e52a8dd0 Robin Gong 2019-10-23 636 * @brief probe pca9450 regulator device
c46712e52a8dd0 Robin Gong 2019-10-23 637 * @param pdev pca9450 regulator platform device
c46712e52a8dd0 Robin Gong 2019-10-23 638 * @retval 0 success
c46712e52a8dd0 Robin Gong 2019-10-23 639 * @retval negative fail
c46712e52a8dd0 Robin Gong 2019-10-23 640 */
c46712e52a8dd0 Robin Gong 2019-10-23 641 static int pca9450_probe(struct platform_device *pdev)
c46712e52a8dd0 Robin Gong 2019-10-23 642 {
c46712e52a8dd0 Robin Gong 2019-10-23 643 struct pca9450_pmic *pmic;
c46712e52a8dd0 Robin Gong 2019-10-23 644 struct pca9450_board *pdata;
c46712e52a8dd0 Robin Gong 2019-10-23 645 struct regulator_config config = {};
c46712e52a8dd0 Robin Gong 2019-10-23 646 struct pca9450 *pca9450 = dev_get_drvdata(pdev->dev.parent);
c46712e52a8dd0 Robin Gong 2019-10-23 647 struct of_regulator_match *matches = NULL;
c46712e52a8dd0 Robin Gong 2019-10-23 648 int i = 0, err, irq = 0, ret = 0;
c46712e52a8dd0 Robin Gong 2019-10-23 649
c46712e52a8dd0 Robin Gong 2019-10-23 650 pmic = kzalloc(sizeof(*pmic), GFP_KERNEL);
c46712e52a8dd0 Robin Gong 2019-10-23 651 if (!pmic)
c46712e52a8dd0 Robin Gong 2019-10-23 652 return -ENOMEM;
c46712e52a8dd0 Robin Gong 2019-10-23 653
c46712e52a8dd0 Robin Gong 2019-10-23 654 memcpy(pmic->descs, pca9450_regulators, sizeof(pmic->descs));
c46712e52a8dd0 Robin Gong 2019-10-23 655
c46712e52a8dd0 Robin Gong 2019-10-23 656 pmic->dev = &pdev->dev;
c46712e52a8dd0 Robin Gong 2019-10-23 657 pmic->mfd = pca9450;
c46712e52a8dd0 Robin Gong 2019-10-23 658 platform_set_drvdata(pdev, pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 659 pdata = dev_get_platdata(pca9450->dev);
c46712e52a8dd0 Robin Gong 2019-10-23 660
c46712e52a8dd0 Robin Gong 2019-10-23 661 if (!pdata && pca9450->dev->of_node) {
c46712e52a8dd0 Robin Gong 2019-10-23 662 pca9450_parse_dt_reg_data(pdev, &matches);
c46712e52a8dd0 Robin Gong 2019-10-23 663 if (matches == NULL) {
c46712e52a8dd0 Robin Gong 2019-10-23 664 dev_err(&pdev->dev, "Platform data not found\n");
c46712e52a8dd0 Robin Gong 2019-10-23 665 return -EINVAL;
c46712e52a8dd0 Robin Gong 2019-10-23 666 }
c46712e52a8dd0 Robin Gong 2019-10-23 667 }
c46712e52a8dd0 Robin Gong 2019-10-23 668
c46712e52a8dd0 Robin Gong 2019-10-23 669 /* Get buck dvs parameters */
c46712e52a8dd0 Robin Gong 2019-10-23 670 of_pca9450_buck_dvs(pdev, &pmic->buck_dvs[0]);
c46712e52a8dd0 Robin Gong 2019-10-23 671
c46712e52a8dd0 Robin Gong 2019-10-23 672 for (i = 0; i < PCA9450_REGULATOR_CNT; i++) {
c46712e52a8dd0 Robin Gong 2019-10-23 673 struct regulator_init_data *init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 674 struct regulator_desc *desc;
c46712e52a8dd0 Robin Gong 2019-10-23 675 struct regulator_dev *rdev;
c46712e52a8dd0 Robin Gong 2019-10-23 676
c46712e52a8dd0 Robin Gong 2019-10-23 677 desc = &pmic->descs[i];
c46712e52a8dd0 Robin Gong 2019-10-23 @678 desc->name = pca9450_matches[i].name;
c46712e52a8dd0 Robin Gong 2019-10-23 679
c46712e52a8dd0 Robin Gong 2019-10-23 680 if (pdata)
c46712e52a8dd0 Robin Gong 2019-10-23 681 init_data = pdata->init_data[i];
c46712e52a8dd0 Robin Gong 2019-10-23 682 else
c46712e52a8dd0 Robin Gong 2019-10-23 683 init_data = pca9450_matches[i].init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 684
c46712e52a8dd0 Robin Gong 2019-10-23 685 config.dev = pmic->dev;
c46712e52a8dd0 Robin Gong 2019-10-23 686 config.init_data = init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 687 config.driver_data = pmic;
c46712e52a8dd0 Robin Gong 2019-10-23 688 config.regmap = pca9450->regmap;
c46712e52a8dd0 Robin Gong 2019-10-23 689 if (matches)
c46712e52a8dd0 Robin Gong 2019-10-23 690 config.of_node = matches[i].of_node;
c46712e52a8dd0 Robin Gong 2019-10-23 691 dev_dbg(config.dev, "regulator register name '%s'\n",
c46712e52a8dd0 Robin Gong 2019-10-23 692 desc->name);
c46712e52a8dd0 Robin Gong 2019-10-23 693
c46712e52a8dd0 Robin Gong 2019-10-23 694 rdev = regulator_register(desc, &config);
c46712e52a8dd0 Robin Gong 2019-10-23 695 if (IS_ERR(rdev)) {
c46712e52a8dd0 Robin Gong 2019-10-23 696 dev_err(pca9450->dev,
c46712e52a8dd0 Robin Gong 2019-10-23 697 "failed to register %s regulator\n",
c46712e52a8dd0 Robin Gong 2019-10-23 698 desc->name);
c46712e52a8dd0 Robin Gong 2019-10-23 699 err = PTR_ERR(rdev);
c46712e52a8dd0 Robin Gong 2019-10-23 700 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 701 }
c46712e52a8dd0 Robin Gong 2019-10-23 702 pmic->rdev[i] = rdev;
c46712e52a8dd0 Robin Gong 2019-10-23 703 }
c46712e52a8dd0 Robin Gong 2019-10-23 704
c46712e52a8dd0 Robin Gong 2019-10-23 705 /* Init sysfs registers */
c46712e52a8dd0 Robin Gong 2019-10-23 706 pmic->reg_index = -1;
c46712e52a8dd0 Robin Gong 2019-10-23 707
c46712e52a8dd0 Robin Gong 2019-10-23 708 err = sysfs_create_group(&pdev->dev.kobj, &clk_attr_group);
c46712e52a8dd0 Robin Gong 2019-10-23 709 if (err != 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 710 dev_err(&pdev->dev, "Failed to create sysfs: %d\n", err);
c46712e52a8dd0 Robin Gong 2019-10-23 711 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 712 }
c46712e52a8dd0 Robin Gong 2019-10-23 713
c46712e52a8dd0 Robin Gong 2019-10-23 714 /* Init Buck1/2/3 dvs */
c46712e52a8dd0 Robin Gong 2019-10-23 715 err = pca9450_buck123_dvs_init(pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 716 if (err != 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 717 dev_err(&pdev->dev, "Failed to buck123 dvs: %d\n", err);
c46712e52a8dd0 Robin Gong 2019-10-23 718 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 719 }
c46712e52a8dd0 Robin Gong 2019-10-23 720
c46712e52a8dd0 Robin Gong 2019-10-23 721 /* Add Interrupt */
c46712e52a8dd0 Robin Gong 2019-10-23 722 irq = platform_get_irq(pdev, 0);
c46712e52a8dd0 Robin Gong 2019-10-23 723 if (irq <= 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 724 dev_warn(&pdev->dev, "platform irq error # %d\n", irq);
c46712e52a8dd0 Robin Gong 2019-10-23 725 return -ENXIO;
c46712e52a8dd0 Robin Gong 2019-10-23 726 }
c46712e52a8dd0 Robin Gong 2019-10-23 727 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
c46712e52a8dd0 Robin Gong 2019-10-23 728 pca9450_pmic_interrupt,
c46712e52a8dd0 Robin Gong 2019-10-23 729 IRQF_TRIGGER_LOW | IRQF_EARLY_RESUME,
c46712e52a8dd0 Robin Gong 2019-10-23 730 dev_name(&pdev->dev), &pdev->dev);
c46712e52a8dd0 Robin Gong 2019-10-23 731 if (ret < 0)
c46712e52a8dd0 Robin Gong 2019-10-23 732 dev_err(&pdev->dev, "IRQ %d is not free.\n", irq);
c46712e52a8dd0 Robin Gong 2019-10-23 733
c46712e52a8dd0 Robin Gong 2019-10-23 734 /* Un-mask IRQ Interrupt */
c46712e52a8dd0 Robin Gong 2019-10-23 735 ret = pca9450_reg_write(pca9450, PCA9450_INT1_MSK, 0);
c46712e52a8dd0 Robin Gong 2019-10-23 736 if (ret < 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 737 dev_err(&pdev->dev, "Write 'PCA9450_REG_MIRQ': failed!\n");
c46712e52a8dd0 Robin Gong 2019-10-23 738 ret = -EIO;
c46712e52a8dd0 Robin Gong 2019-10-23 739 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 740 }
c46712e52a8dd0 Robin Gong 2019-10-23 741
c46712e52a8dd0 Robin Gong 2019-10-23 742 return 0;
c46712e52a8dd0 Robin Gong 2019-10-23 743
c46712e52a8dd0 Robin Gong 2019-10-23 744 err:
c46712e52a8dd0 Robin Gong 2019-10-23 745 while (--i >= 0)
c46712e52a8dd0 Robin Gong 2019-10-23 746 regulator_unregister(pmic->rdev[i]);
c46712e52a8dd0 Robin Gong 2019-10-23 747
c46712e52a8dd0 Robin Gong 2019-10-23 748 kfree(pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 749 return err;
c46712e52a8dd0 Robin Gong 2019-10-23 750 }
c46712e52a8dd0 Robin Gong 2019-10-23 751
:::::: The code at line 678 was first introduced by commit
:::::: c46712e52a8dd0ecce6efbd2d2d56919352478a9 MLK-22824-2: regulator: pca9450: add pca9450 regulator driver
:::::: TO: Robin Gong <yibin.gong@nxp.com>
:::::: CC: Robin Gong <yibin.gong@nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26784 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-28 22:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28 22:38 [freescale-fslc:pr/428 14380/20799] drivers/regulator/pca9450-regulator.c:678:16: error: 'pca9450_matches' undeclared kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.