tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.9
head: 308d4977f794c79237b96eaf6ab3ec4ef472d9d3
commit: c1cff716737c7ee5e93144ddaa520f1b396fcf82 [21/22] regulator: max77620: Use
device_set_of_node_from_dev()
config: arm-randconfig-r006-20210613 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
d2012d965d60c3258b3a69d024491698f8aec386)
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://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.9
git checkout c1cff716737c7ee5e93144ddaa520f1b396fcf82
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/regulator/max77620-regulator.c:757:2: error: implicit
declaration of function 'device_set_of_node_from_dev'
[-Werror,-Wimplicit-function-declaration]
device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
^
1 error generated.
vim +/device_set_of_node_from_dev +757 drivers/regulator/max77620-regulator.c
718
719 static int max77620_regulator_probe(struct platform_device *pdev)
720 {
721 struct max77620_chip *max77620_chip = dev_get_drvdata(pdev->dev.parent);
722 struct max77620_regulator_info *rinfo;
723 struct device *dev = &pdev->dev;
724 struct regulator_config config = { };
725 struct max77620_regulator *pmic;
726 int ret = 0;
727 int id;
728
729 pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL);
730 if (!pmic)
731 return -ENOMEM;
732
733 platform_set_drvdata(pdev, pmic);
734 pmic->dev = dev;
735 pmic->rmap = max77620_chip->rmap;
736 if (!dev->of_node)
737 dev->of_node = pdev->dev.parent->of_node;
738
739 switch (max77620_chip->chip_id) {
740 case MAX77620:
741 rinfo = max77620_regs_info;
742 break;
743 default:
744 rinfo = max20024_regs_info;
745 break;
746 }
747
748 config.regmap = pmic->rmap;
749 config.dev = dev;
750 config.driver_data = pmic;
751
752 /*
753 * Set of_node_reuse flag to prevent driver core from attempting to
754 * claim any pinmux resources already claimed by the parent device.
755 * Otherwise PMIC driver will fail to re-probe.
756 */
757 device_set_of_node_from_dev(&pdev->dev,
pdev->dev.parent);
758
759 for (id = 0; id < MAX77620_NUM_REGS; id++) {
760 struct regulator_dev *rdev;
761 struct regulator_desc *rdesc;
762
763 if ((max77620_chip->chip_id == MAX77620) &&
764 (id == MAX77620_REGULATOR_ID_SD4))
765 continue;
766
767 rdesc = &rinfo[id].desc;
768 pmic->rinfo[id] = &max77620_regs_info[id];
769 pmic->enable_power_mode[id] = MAX77620_POWER_MODE_NORMAL;
770
771 ret = max77620_read_slew_rate(pmic, id);
772 if (ret < 0)
773 return ret;
774
775 rdev = devm_regulator_register(dev, rdesc, &config);
776 if (IS_ERR(rdev)) {
777 ret = PTR_ERR(rdev);
778 dev_err(dev, "Regulator registration %s failed: %d\n",
779 rdesc->name, ret);
780 return ret;
781 }
782 }
783
784 return 0;
785 }
786
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org