* [linux-next:master 1403/5542] drivers/power/supply/max8997_charger.c:261:9: error: implicit declaration of function 'devm_extcon_register_notifier_all'
@ 2021-01-25 8:13 kernel test robot
2021-01-25 10:43 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-01-25 8:13 UTC (permalink / raw)
To: Timon Baetz
Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
Sebastian Reichel, Krzysztof Kozlowski
[-- Attachment #1: Type: text/plain, Size: 5860 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 226871e2eda4832d94c3239add7e52ad17b81ce5
commit: f384989e88d4484fc9a9e31b0cf0a36e6f172136 [1403/5542] power: supply: max8997_charger: Set CHARGER current limit
config: x86_64-randconfig-a014-20210125 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 12d0753aca22896fda2cf76781b0ee0524d55065)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f384989e88d4484fc9a9e31b0cf0a36e6f172136
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f384989e88d4484fc9a9e31b0cf0a36e6f172136
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Note: the linux-next/master HEAD 226871e2eda4832d94c3239add7e52ad17b81ce5 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
>> drivers/power/supply/max8997_charger.c:261:9: error: implicit declaration of function 'devm_extcon_register_notifier_all' [-Werror,-Wimplicit-function-declaration]
ret = devm_extcon_register_notifier_all(&pdev->dev, charger->edev,
^
drivers/power/supply/max8997_charger.c:261:9: note: did you mean 'devm_extcon_register_notifier'?
include/linux/extcon.h:263:19: note: 'devm_extcon_register_notifier' declared here
static inline int devm_extcon_register_notifier(struct device *dev,
^
1 error generated.
vim +/devm_extcon_register_notifier_all +261 drivers/power/supply/max8997_charger.c
165
166 static int max8997_battery_probe(struct platform_device *pdev)
167 {
168 int ret = 0;
169 struct charger_data *charger;
170 struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
171 struct i2c_client *i2c = iodev->i2c;
172 struct max8997_platform_data *pdata = iodev->pdata;
173 struct power_supply_config psy_cfg = {};
174
175 if (!pdata) {
176 dev_err(&pdev->dev, "No platform data supplied.\n");
177 return -EINVAL;
178 }
179
180 if (pdata->eoc_mA) {
181 int val = (pdata->eoc_mA - 50) / 10;
182 if (val < 0)
183 val = 0;
184 if (val > 0xf)
185 val = 0xf;
186
187 ret = max8997_update_reg(i2c, MAX8997_REG_MBCCTRL5,
188 val << ITOPOFF_SHIFT, ITOPOFF_MASK);
189 if (ret < 0) {
190 dev_err(&pdev->dev, "Cannot use i2c bus.\n");
191 return ret;
192 }
193 }
194 switch (pdata->timeout) {
195 case 5:
196 ret = max8997_update_reg(i2c, MAX8997_REG_MBCCTRL1,
197 0x2 << TFCH_SHIFT, TFCH_MASK);
198 break;
199 case 6:
200 ret = max8997_update_reg(i2c, MAX8997_REG_MBCCTRL1,
201 0x3 << TFCH_SHIFT, TFCH_MASK);
202 break;
203 case 7:
204 ret = max8997_update_reg(i2c, MAX8997_REG_MBCCTRL1,
205 0x4 << TFCH_SHIFT, TFCH_MASK);
206 break;
207 case 0:
208 ret = max8997_update_reg(i2c, MAX8997_REG_MBCCTRL1,
209 0x7 << TFCH_SHIFT, TFCH_MASK);
210 break;
211 default:
212 dev_err(&pdev->dev, "incorrect timeout value (%d)\n",
213 pdata->timeout);
214 return -EINVAL;
215 }
216 if (ret < 0) {
217 dev_err(&pdev->dev, "Cannot use i2c bus.\n");
218 return ret;
219 }
220
221 charger = devm_kzalloc(&pdev->dev, sizeof(*charger), GFP_KERNEL);
222 if (!charger)
223 return -ENOMEM;
224
225 platform_set_drvdata(pdev, charger);
226
227 charger->dev = &pdev->dev;
228 charger->iodev = iodev;
229
230 psy_cfg.drv_data = charger;
231
232 charger->battery = devm_power_supply_register(&pdev->dev,
233 &max8997_battery_desc,
234 &psy_cfg);
235 if (IS_ERR(charger->battery)) {
236 dev_err(&pdev->dev, "failed: power supply register\n");
237 return PTR_ERR(charger->battery);
238 }
239
240 charger->reg = devm_regulator_get_optional(&pdev->dev, "charger");
241 if (IS_ERR(charger->reg)) {
242 if (PTR_ERR(charger->reg) == -EPROBE_DEFER)
243 return -EPROBE_DEFER;
244 dev_info(&pdev->dev, "couldn't get charger regulator\n");
245 }
246 charger->edev = extcon_get_edev_by_phandle(&pdev->dev, 0);
247 if (IS_ERR(charger->edev)) {
248 if (PTR_ERR(charger->edev) == -EPROBE_DEFER)
249 return -EPROBE_DEFER;
250 dev_info(charger->dev, "couldn't get extcon device\n");
251 }
252
253 if (!IS_ERR(charger->reg) && !IS_ERR(charger->edev)) {
254 INIT_WORK(&charger->extcon_work, max8997_battery_extcon_evt_worker);
255 ret = devm_add_action(&pdev->dev, max8997_battery_extcon_evt_stop_work, charger);
256 if (ret) {
257 dev_err(&pdev->dev, "failed to add extcon evt stop action: %d\n", ret);
258 return ret;
259 }
260 charger->extcon_nb.notifier_call = max8997_battery_extcon_evt;
> 261 ret = devm_extcon_register_notifier_all(&pdev->dev, charger->edev,
262 &charger->extcon_nb);
263 if (ret) {
264 dev_err(&pdev->dev, "failed to register extcon notifier\n");
265 return ret;
266 };
267 }
268
269 return 0;
270 }
271
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30975 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:master 1403/5542] drivers/power/supply/max8997_charger.c:261:9: error: implicit declaration of function 'devm_extcon_register_notifier_all'
2021-01-25 8:13 [linux-next:master 1403/5542] drivers/power/supply/max8997_charger.c:261:9: error: implicit declaration of function 'devm_extcon_register_notifier_all' kernel test robot
@ 2021-01-25 10:43 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-25 10:43 UTC (permalink / raw)
To: kernel test robot
Cc: Timon Baetz, kbuild-all, clang-built-linux,
Linux Memory Management List, Sebastian Reichel
On Mon, Jan 25, 2021 at 04:13:03PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 226871e2eda4832d94c3239add7e52ad17b81ce5
> commit: f384989e88d4484fc9a9e31b0cf0a36e6f172136 [1403/5542] power: supply: max8997_charger: Set CHARGER current limit
> config: x86_64-randconfig-a014-20210125 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 12d0753aca22896fda2cf76781b0ee0524d55065)
> 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 x86_64 cross compiling tool for clang build
> # apt-get install binutils-x86-64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f384989e88d4484fc9a9e31b0cf0a36e6f172136
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout f384989e88d4484fc9a9e31b0cf0a36e6f172136
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> Note: the linux-next/master HEAD 226871e2eda4832d94c3239add7e52ad17b81ce5 builds fine.
> It may have been fixed somewhere.
>
> All errors (new ones prefixed by >>):
>
> >> drivers/power/supply/max8997_charger.c:261:9: error: implicit declaration of function 'devm_extcon_register_notifier_all' [-Werror,-Wimplicit-function-declaration]
> ret = devm_extcon_register_notifier_all(&pdev->dev, charger->edev,
> ^
> drivers/power/supply/max8997_charger.c:261:9: note: did you mean 'devm_extcon_register_notifier'?
> include/linux/extcon.h:263:19: note: 'devm_extcon_register_notifier' declared here
> static inline int devm_extcon_register_notifier(struct device *dev,
> ^
> 1 error generated.
>
>
I think this will be fixed via extcon tree with:
https://lore.kernel.org/lkml/20201231085252.69831-1-krzk@kernel.org/
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-25 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25 8:13 [linux-next:master 1403/5542] drivers/power/supply/max8997_charger.c:261:9: error: implicit declaration of function 'devm_extcon_register_notifier_all' kernel test robot
2021-01-25 10:43 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox