Re: [PATCH v4 2/2] power_supply: platform/chrome: wilco_ec: Add charging config driver

kbuild test robot
2019-04-19T23:06:18Z

[-- Attachment #1: Type: text/plain, Size: 4208 bytes --]

Hi Nick,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.1-rc5 next-20190418]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Nick-Crews/power_supply-Add-more-charge-types-and-CHARGE_CONTROL_-properties/20190420-045118
config: i386-randconfig-x017-201915 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

drivers/platform/chrome/wilco_ec/core.c: In function 'wilco_ec_probe':
>> drivers/platform/chrome/wilco_ec/core.c:106:33: error: 'struct wilco_ec_device' has no member named 'kbbl_pdev'; did you mean 'rtc_pdev'?
platform_device_unregister(ec->kbbl_pdev);
^~~~~~~~~
rtc_pdev
drivers/platform/chrome/wilco_ec/core.c:105:1: warning: label 'unregister_kbbl' defined but not used [-Wunused-label]
unregister_kbbl:
^~~~~~~~~~~~~~~

vim +106 drivers/platform/chrome/wilco_ec/core.c

40
41 static int wilco_ec_probe(struct platform_device *pdev)
42 {
43 struct device *dev = &pdev->dev;
44 struct wilco_ec_device *ec;
45 int ret;
46
47 ec = devm_kzalloc(dev, sizeof(*ec), GFP_KERNEL);
48 if (!ec)
49 return -ENOMEM;
50
51 platform_set_drvdata(pdev, ec);
52 ec->dev = dev;
53 mutex_init(&ec->mailbox_lock);
54
55 /* Largest data buffer size requirement is extended data response */
56 ec->data_size = sizeof(struct wilco_ec_response) +
57 EC_MAILBOX_DATA_SIZE_EXTENDED;
58 ec->data_buffer = devm_kzalloc(dev, ec->data_size, GFP_KERNEL);
59 if (!ec->data_buffer)
60 return -ENOMEM;
61
62 /* Prepare access to IO regions provided by ACPI */
63 ec->io_data = wilco_get_resource(pdev, 0); /* Host Data */
64 ec->io_command = wilco_get_resource(pdev, 1); /* Host Command */
65 ec->io_packet = wilco_get_resource(pdev, 2); /* MEC EMI */
66 if (!ec->io_data || !ec->io_command || !ec->io_packet)
67 return -ENODEV;
68
69 /* Initialize cros_ec register interface for communication */
70 cros_ec_lpc_mec_init(ec->io_packet->start,
71 ec->io_packet->start + EC_MAILBOX_DATA_SIZE);
72
73 /*
74 * Register a child device that will be found by the debugfs driver.
75 * Ignore failure.
76 */
77 ec->debugfs_pdev = platform_device_register_data(dev,
78 "wilco-ec-debugfs",
79 PLATFORM_DEVID_AUTO,
80 NULL, 0);
81
82 /* Register a child device that will be found by the RTC driver. */
83 ec->rtc_pdev = platform_device_register_data(dev, "rtc-wilco-ec",
84 PLATFORM_DEVID_AUTO,
85 NULL, 0);
86 if (IS_ERR(ec->rtc_pdev)) {
87 dev_err(dev, "Failed to create RTC platform device\n");
88 ret = PTR_ERR(ec->rtc_pdev);
89 goto unregister_debugfs;
90 }
91
92 /* Register child device to be found by charging config driver. */
93 ec->charging_pdev = platform_device_register_data(dev,
94 "wilco-ec-charging",
95 PLATFORM_DEVID_AUTO,
96 NULL, 0);
97 if (IS_ERR(ec->charging_pdev)) {
98 dev_err(dev, "Failed to create charging platform device\n");
99 ret = PTR_ERR(ec->charging_pdev);
100 goto unregister_rtc;
101 }
102
103 return 0;
104
105 unregister_kbbl:
> 106 platform_device_unregister(ec->kbbl_pdev);
107 unregister_rtc:
108 platform_device_unregister(ec->rtc_pdev);
109 unregister_debugfs:
110 if (ec->debugfs_pdev)
111 platform_device_unregister(ec->debugfs_pdev);
112 cros_ec_lpc_mec_destroy();
113 return ret;
114 }
115

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27300 bytes --]