[sunxi:sunxi/clk-for-5.17 3/10] drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:532:46: error: 'pdev' undeclared

From: kernel test robot
Date: Mon Nov 22 2021 - 14:39:28 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/clk-for-5.17
head: c81821db64a8957e8ff4ebd4cdda60243ab5c949
commit: 72dc8e122383fcce2ef6d32e351ec0609bd7ca49 [3/10] clk: sunxi-ng: Convert early providers to platform drivers
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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/sunxi/linux.git/commit/?id=72dc8e122383fcce2ef6d32e351ec0609bd7ca49
git remote add sunxi https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
git fetch --no-tags sunxi sunxi/clk-for-5.17
git checkout 72dc8e122383fcce2ef6d32e351ec0609bd7ca49
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c: In function 'suniv_f1c100s_ccu_setup':
>> drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:532:46: error: 'pdev' undeclared (first use in this function)
532 | reg = devm_platform_ioremap_resource(pdev, 0);
| ^~~~
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:532:46: note: each undeclared identifier is reported only once for each function it appears in
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:534:24: error: 'return' with a value, in function returning void [-Werror=return-type]
534 | return PTR_ERR(reg);
| ^~~~~~~~~~~~
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:526:20: note: declared here
526 | static void __init suniv_f1c100s_ccu_setup(struct device_node *node)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:543:24: error: 'return' with a value, in function returning void [-Werror=return-type]
543 | return ret;
| ^~~
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:526:20: note: declared here
526 | static void __init suniv_f1c100s_ccu_setup(struct device_node *node)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:552:16: error: 'return' with a value, in function returning void [-Werror=return-type]
552 | return 0;
| ^
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:526:20: note: declared here
526 | static void __init suniv_f1c100s_ccu_setup(struct device_node *node)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c: At top level:
>> drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:561:19: error: 'suniv_f1c100s_ccu_probe' undeclared here (not in a function); did you mean 'suniv_f1c100s_ccu_driver'?
561 | .probe = suniv_f1c100s_ccu_probe,
| ^~~~~~~~~~~~~~~~~~~~~~~
| suniv_f1c100s_ccu_driver
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c:526:20: warning: 'suniv_f1c100s_ccu_setup' defined but not used [-Wunused-function]
526 | static void __init suniv_f1c100s_ccu_setup(struct device_node *node)
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +/pdev +532 drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c

525
526 static void __init suniv_f1c100s_ccu_setup(struct device_node *node)
527 {
528 void __iomem *reg;
529 int ret;
530 u32 val;
531
> 532 reg = devm_platform_ioremap_resource(pdev, 0);
533 if (IS_ERR(reg))
534 return PTR_ERR(reg);
535
536 /* Force the PLL-Audio-1x divider to 4 */
537 val = readl(reg + SUNIV_PLL_AUDIO_REG);
538 val &= ~GENMASK(19, 16);
539 writel(val | (3 << 16), reg + SUNIV_PLL_AUDIO_REG);
540
541 ret = devm_sunxi_ccu_probe(&pdev->dev, reg, &suniv_ccu_desc);
542 if (ret)
543 return ret;
544
545 /* Gate then ungate PLL CPU after any rate changes */
546 ccu_pll_notifier_register(&suniv_pll_cpu_nb);
547
548 /* Reparent CPU during PLL CPU rate changes */
549 ccu_mux_notifier_register(pll_cpu_clk.common.hw.clk,
550 &suniv_cpu_nb);
551
552 return 0;
553 }
554
555 static const struct of_device_id suniv_f1c100s_ccu_ids[] = {
556 { .compatible = "allwinner,suniv-f1c100s-ccu" },
557 { }
558 };
559
560 static struct platform_driver suniv_f1c100s_ccu_driver = {
> 561 .probe = suniv_f1c100s_ccu_probe,
562 .driver = {
563 .name = "suniv-f1c100s-ccu",
564 .suppress_bind_attrs = true,
565 .of_match_table = suniv_f1c100s_ccu_ids,
566 },
567 };
568 module_platform_driver(suniv_f1c100s_ccu_driver);
569

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip