From: kernel test robot <lkp@intel.com>
To: Marc Zyngier <maz@kernel.org>
Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org
Subject: [arm-platforms:hack/devm_cast_abuse 16/17] drivers/rtc/rtc-jz4740.c:333:8: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean
Date: Wed, 16 Dec 2020 05:18:55 +0800 [thread overview]
Message-ID: <202012160551.gO4Sbx42-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4235 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/devm_cast_abuse
head: 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3
commit: fe1aec9b36b68f59f0c78233d76d4fdd4153a5a2 [16/17] rtc: Bulk conversion to devm_clk_prepare_enable()
config: m68k-randconfig-r012-20201215 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=fe1aec9b36b68f59f0c78233d76d4fdd4153a5a2
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms hack/devm_cast_abuse
git checkout fe1aec9b36b68f59f0c78233d76d4fdd4153a5a2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/rtc/rtc-jz4740.c: In function 'jz4740_rtc_probe':
>> drivers/rtc/rtc-jz4740.c:333:8: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean 'clk_prepare_enable'? [-Werror=implicit-function-declaration]
333 | ret = devm_clk_prepare_enable(dev, clk);
| ^~~~~~~~~~~~~~~~~~~~~~~
| clk_prepare_enable
cc1: some warnings being treated as errors
vim +333 drivers/rtc/rtc-jz4740.c
303
304 static int jz4740_rtc_probe(struct platform_device *pdev)
305 {
306 struct device *dev = &pdev->dev;
307 struct device_node *np = dev->of_node;
308 struct jz4740_rtc *rtc;
309 unsigned long rate;
310 struct clk *clk;
311 int ret, irq;
312
313 rtc = devm_kzalloc(dev, sizeof(*rtc), GFP_KERNEL);
314 if (!rtc)
315 return -ENOMEM;
316
317 rtc->type = (enum jz4740_rtc_type)device_get_match_data(dev);
318
319 irq = platform_get_irq(pdev, 0);
320 if (irq < 0)
321 return irq;
322
323 rtc->base = devm_platform_ioremap_resource(pdev, 0);
324 if (IS_ERR(rtc->base))
325 return PTR_ERR(rtc->base);
326
327 clk = devm_clk_get(dev, "rtc");
328 if (IS_ERR(clk)) {
329 dev_err(dev, "Failed to get RTC clock\n");
330 return PTR_ERR(clk);
331 }
332
> 333 ret = devm_clk_prepare_enable(dev, clk);
334 if (ret) {
335 dev_err(dev, "Failed to register devm action\n");
336 return ret;
337 }
338
339 spin_lock_init(&rtc->lock);
340
341 platform_set_drvdata(pdev, rtc);
342
343 device_init_wakeup(dev, 1);
344
345 ret = dev_pm_set_wake_irq(dev, irq);
346 if (ret) {
347 dev_err(dev, "Failed to set wake irq: %d\n", ret);
348 return ret;
349 }
350
351 rtc->rtc = devm_rtc_allocate_device(dev);
352 if (IS_ERR(rtc->rtc)) {
353 ret = PTR_ERR(rtc->rtc);
354 dev_err(dev, "Failed to allocate rtc device: %d\n", ret);
355 return ret;
356 }
357
358 rtc->rtc->ops = &jz4740_rtc_ops;
359 rtc->rtc->range_max = U32_MAX;
360
361 rate = clk_get_rate(clk);
362 jz4740_rtc_set_wakeup_params(rtc, np, rate);
363
364 /* Each 1 Hz pulse should happen after (rate) ticks */
365 jz4740_rtc_reg_write(rtc, JZ_REG_RTC_REGULATOR, rate - 1);
366
367 ret = devm_rtc_register_device(rtc->rtc);
368 if (ret)
369 return ret;
370
371 ret = devm_request_irq(dev, irq, jz4740_rtc_irq, 0,
372 pdev->name, rtc);
373 if (ret) {
374 dev_err(dev, "Failed to request rtc irq: %d\n", ret);
375 return ret;
376 }
377
378 if (of_device_is_system_power_controller(np)) {
379 dev_for_power_off = dev;
380
381 if (!pm_power_off)
382 pm_power_off = jz4740_rtc_power_off;
383 else
384 dev_warn(dev, "Poweroff handler already present!\n");
385 }
386
387 return 0;
388 }
389
---
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: 16039 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [arm-platforms:hack/devm_cast_abuse 16/17] drivers/rtc/rtc-jz4740.c:333:8: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean
Date: Wed, 16 Dec 2020 05:18:55 +0800 [thread overview]
Message-ID: <202012160551.gO4Sbx42-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4357 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/devm_cast_abuse
head: 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3
commit: fe1aec9b36b68f59f0c78233d76d4fdd4153a5a2 [16/17] rtc: Bulk conversion to devm_clk_prepare_enable()
config: m68k-randconfig-r012-20201215 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=fe1aec9b36b68f59f0c78233d76d4fdd4153a5a2
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms hack/devm_cast_abuse
git checkout fe1aec9b36b68f59f0c78233d76d4fdd4153a5a2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/rtc/rtc-jz4740.c: In function 'jz4740_rtc_probe':
>> drivers/rtc/rtc-jz4740.c:333:8: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean 'clk_prepare_enable'? [-Werror=implicit-function-declaration]
333 | ret = devm_clk_prepare_enable(dev, clk);
| ^~~~~~~~~~~~~~~~~~~~~~~
| clk_prepare_enable
cc1: some warnings being treated as errors
vim +333 drivers/rtc/rtc-jz4740.c
303
304 static int jz4740_rtc_probe(struct platform_device *pdev)
305 {
306 struct device *dev = &pdev->dev;
307 struct device_node *np = dev->of_node;
308 struct jz4740_rtc *rtc;
309 unsigned long rate;
310 struct clk *clk;
311 int ret, irq;
312
313 rtc = devm_kzalloc(dev, sizeof(*rtc), GFP_KERNEL);
314 if (!rtc)
315 return -ENOMEM;
316
317 rtc->type = (enum jz4740_rtc_type)device_get_match_data(dev);
318
319 irq = platform_get_irq(pdev, 0);
320 if (irq < 0)
321 return irq;
322
323 rtc->base = devm_platform_ioremap_resource(pdev, 0);
324 if (IS_ERR(rtc->base))
325 return PTR_ERR(rtc->base);
326
327 clk = devm_clk_get(dev, "rtc");
328 if (IS_ERR(clk)) {
329 dev_err(dev, "Failed to get RTC clock\n");
330 return PTR_ERR(clk);
331 }
332
> 333 ret = devm_clk_prepare_enable(dev, clk);
334 if (ret) {
335 dev_err(dev, "Failed to register devm action\n");
336 return ret;
337 }
338
339 spin_lock_init(&rtc->lock);
340
341 platform_set_drvdata(pdev, rtc);
342
343 device_init_wakeup(dev, 1);
344
345 ret = dev_pm_set_wake_irq(dev, irq);
346 if (ret) {
347 dev_err(dev, "Failed to set wake irq: %d\n", ret);
348 return ret;
349 }
350
351 rtc->rtc = devm_rtc_allocate_device(dev);
352 if (IS_ERR(rtc->rtc)) {
353 ret = PTR_ERR(rtc->rtc);
354 dev_err(dev, "Failed to allocate rtc device: %d\n", ret);
355 return ret;
356 }
357
358 rtc->rtc->ops = &jz4740_rtc_ops;
359 rtc->rtc->range_max = U32_MAX;
360
361 rate = clk_get_rate(clk);
362 jz4740_rtc_set_wakeup_params(rtc, np, rate);
363
364 /* Each 1 Hz pulse should happen after (rate) ticks */
365 jz4740_rtc_reg_write(rtc, JZ_REG_RTC_REGULATOR, rate - 1);
366
367 ret = devm_rtc_register_device(rtc->rtc);
368 if (ret)
369 return ret;
370
371 ret = devm_request_irq(dev, irq, jz4740_rtc_irq, 0,
372 pdev->name, rtc);
373 if (ret) {
374 dev_err(dev, "Failed to request rtc irq: %d\n", ret);
375 return ret;
376 }
377
378 if (of_device_is_system_power_controller(np)) {
379 dev_for_power_off = dev;
380
381 if (!pm_power_off)
382 pm_power_off = jz4740_rtc_power_off;
383 else
384 dev_warn(dev, "Poweroff handler already present!\n");
385 }
386
387 return 0;
388 }
389
---
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: 16039 bytes --]
next reply other threads:[~2020-12-15 21:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 21:18 kernel test robot [this message]
2020-12-15 21:18 ` [arm-platforms:hack/devm_cast_abuse 16/17] drivers/rtc/rtc-jz4740.c:333:8: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202012160551.gO4Sbx42-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.