Re: [PATCH RESEND v6 2/3] platform: arm64: add Huawei Matebook E Go EC driver
From: kernel test robot
Date: Fri Jan 31 2025 - 15:08:18 EST
Hi Pengyu,
kernel test robot noticed the following build errors:
[auto build test ERROR on 853d1f41ba73e78d22e7075d9a95670aab187eba]
url: https://github.com/intel-lab-lkp/linux/commits/Pengyu-Luo/dt-bindings-platform-Add-Huawei-Matebook-E-Go-EC/20250131-172427
base: 853d1f41ba73e78d22e7075d9a95670aab187eba
patch link: https://lore.kernel.org/r/20250131092139.6065-3-mitltlatltl%40gmail.com
patch subject: [PATCH RESEND v6 2/3] platform: arm64: add Huawei Matebook E Go EC driver
config: powerpc64-randconfig-003-20250201 (https://download.01.org/0day-ci/archive/20250201/202502010344.KWDBQUG9-lkp@xxxxxxxxx/config)
compiler: powerpc64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250201/202502010344.KWDBQUG9-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502010344.KWDBQUG9-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
powerpc64-linux-ld: warning: discarding dynamic section .glink
powerpc64-linux-ld: warning: discarding dynamic section .plt
powerpc64-linux-ld: linkage table error against `devm_hwmon_device_register_with_info'
powerpc64-linux-ld: stubs don't match calculated size
powerpc64-linux-ld: can not build stubs: bad value
powerpc64-linux-ld: drivers/platform/arm64/huawei-gaokun-ec.o: in function `gaokun_ec_probe':
>> drivers/platform/arm64/huawei-gaokun-ec.c:786:(.text+0x16ac): undefined reference to `devm_hwmon_device_register_with_info'
vim +786 drivers/platform/arm64/huawei-gaokun-ec.c
740
741 static int gaokun_ec_probe(struct i2c_client *client)
742 {
743 struct device *dev = &client->dev;
744 struct gaokun_ec *ec;
745 int ret;
746
747 ec = devm_kzalloc(dev, sizeof(*ec), GFP_KERNEL);
748 if (!ec)
749 return -ENOMEM;
750
751 ret = devm_mutex_init(dev, &ec->lock);
752 if (ret)
753 return ret;
754
755 ec->client = client;
756 i2c_set_clientdata(client, ec);
757 BLOCKING_INIT_NOTIFIER_HEAD(&ec->notifier_list);
758
759 /* Lid switch */
760 ec->idev = devm_input_allocate_device(dev);
761 if (!ec->idev)
762 return -ENOMEM;
763
764 ec->idev->name = "LID";
765 ec->idev->phys = "gaokun-ec/input0";
766 input_set_capability(ec->idev, EV_SW, SW_LID);
767
768 ret = input_register_device(ec->idev);
769 if (ret)
770 return dev_err_probe(dev, ret, "Failed to register input device\n");
771
772 ret = gaokun_aux_init(dev, GAOKUN_DEV_PSY, ec);
773 if (ret)
774 return ret;
775
776 ret = gaokun_aux_init(dev, GAOKUN_DEV_UCSI, ec);
777 if (ret)
778 return ret;
779
780 ret = devm_request_threaded_irq(dev, client->irq, NULL,
781 gaokun_ec_irq_handler, IRQF_ONESHOT,
782 dev_name(dev), ec);
783 if (ret)
784 return dev_err_probe(dev, ret, "Failed to request IRQ\n");
785
> 786 ec->hwmon_dev = devm_hwmon_device_register_with_info(dev, "gaokun_ec_hwmon",
787 ec, &gaokun_ec_hwmon_chip_info, NULL);
788 if (IS_ERR(ec->hwmon_dev))
789 return dev_err_probe(dev, PTR_ERR(ec->hwmon_dev),
790 "Failed to register hwmon device\n");
791
792 return 0;
793 }
794
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki