Content-Type: multipart/mixed; boundary="===============0229636336975837320==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v7 2/2] serial:sunplus-uart:Add Sunplus SoC UART Driver Date: Mon, 07 Feb 2022 19:43:18 +0800 Message-ID: <202202071924.YLKjNyyr-lkp@intel.com> In-Reply-To: <1644213481-20321-3-git-send-email-hammerh0314@gmail.com> List-Id: --===============0229636336975837320== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Hammer, I love your patch! Perhaps something to improve: [auto build test WARNING on linux/master] [cannot apply to tty/tty-testing robh/for-next linus/master v5.17-rc3 next-= 20220207] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Hammer-Hsieh/Add-UART-driv= er-for-Suplus-SP7021-SoC/20220207-144451 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = 2c271fe77d52a0555161926c232cd5bc07178b39 config: ia64-allmodconfig (https://download.01.org/0day-ci/archive/20220207= /202202071924.YLKjNyyr-lkp(a)intel.com/config) compiler: ia64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/423c8dea29f94c6fe20e3864a= 2424e7bc4b79b27 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Hammer-Hsieh/Add-UART-driver-for-S= uplus-SP7021-SoC/20220207-144451 git checkout 423c8dea29f94c6fe20e3864a2424e7bc4b79b27 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dia64 SHELL=3D/bin/bash drivers/tty/serial/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/tty/serial/sunplus-uart.c: In function 'sunplus_uart_probe': >> drivers/tty/serial/sunplus-uart.c:630:40: warning: cast between incompat= ible function types from 'int (*)(struct reset_control *)' to 'void (*)(voi= d *)' [-Wcast-function-type] 630 | (void(*)(void *))reset_co= ntrol_assert, | ^ In file included from drivers/tty/serial/sunplus-uart.c:13: drivers/tty/serial/sunplus-uart.c: At top level: include/linux/module.h:131:49: error: redefinition of '__inittest' 131 | static inline initcall_t __maybe_unused __inittest(void)= \ | ^~~~~~~~~~ drivers/tty/serial/sunplus-uart.c:717:1: note: in expansion of macro 'mo= dule_init' 717 | module_init(sunplus_uart_init); | ^~~~~~~~~~~ include/linux/module.h:131:49: note: previous definition of '__inittest'= with type 'int (*(void))(void)' 131 | static inline initcall_t __maybe_unused __inittest(void)= \ | ^~~~~~~~~~ include/linux/module.h:127:41: note: in expansion of macro 'module_init' 127 | #define console_initcall(fn) module_init(fn) | ^~~~~~~~~~~ drivers/tty/serial/sunplus-uart.c:558:1: note: in expansion of macro 'co= nsole_initcall' 558 | console_initcall(sunplus_console_init); | ^~~~~~~~~~~~~~~~ include/linux/module.h:133:13: error: redefinition of 'init_module' 133 | int init_module(void) __copy(initfn) \ | ^~~~~~~~~~~ drivers/tty/serial/sunplus-uart.c:717:1: note: in expansion of macro 'mo= dule_init' 717 | module_init(sunplus_uart_init); | ^~~~~~~~~~~ include/linux/module.h:133:13: note: previous definition of 'init_module= ' with type 'int(void)' 133 | int init_module(void) __copy(initfn) \ | ^~~~~~~~~~~ include/linux/module.h:127:41: note: in expansion of macro 'module_init' 127 | #define console_initcall(fn) module_init(fn) | ^~~~~~~~~~~ drivers/tty/serial/sunplus-uart.c:558:1: note: in expansion of macro 'co= nsole_initcall' 558 | console_initcall(sunplus_console_init); | ^~~~~~~~~~~~~~~~ drivers/tty/serial/sunplus-uart.c:669:12: warning: 'sunplus_uart_resume'= defined but not used [-Wunused-function] 669 | static int sunplus_uart_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~ drivers/tty/serial/sunplus-uart.c:659:12: warning: 'sunplus_uart_suspend= ' defined but not used [-Wunused-function] 659 | static int sunplus_uart_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~ vim +630 drivers/tty/serial/sunplus-uart.c 570 = 571 static int sunplus_uart_probe(struct platform_device *pdev) 572 { 573 struct sunplus_uart_port *sup; 574 struct uart_port *port; 575 struct resource *res; 576 int ret, irq; 577 = 578 pdev->id =3D of_alias_get_id(pdev->dev.of_node, "serial"); 579 = 580 if (pdev->id < 0 || pdev->id >=3D SUP_UART_NR) 581 return -EINVAL; 582 = 583 sup =3D devm_kzalloc(&pdev->dev, sizeof(*sup), GFP_KERNEL); 584 if (!sup) 585 return -ENOMEM; 586 = 587 sup->clk =3D devm_clk_get_optional(&pdev->dev, NULL); 588 if (IS_ERR(sup->clk)) 589 return dev_err_probe(&pdev->dev, PTR_ERR(sup->clk), "clk not found= \n"); 590 = 591 ret =3D clk_prepare_enable(sup->clk); 592 if (ret) 593 return ret; 594 = 595 ret =3D devm_add_action_or_reset(&pdev->dev, 596 (void(*)(void *))clk_disable_unprepare, 597 sup->clk); 598 if (ret) 599 return ret; 600 = 601 sup->rstc =3D devm_reset_control_get_exclusive(&pdev->dev, NULL); 602 if (IS_ERR(sup->rstc)) 603 return dev_err_probe(&pdev->dev, PTR_ERR(sup->rstc), "rstc not fou= nd\n"); 604 = 605 port =3D &sup->port; 606 = 607 port->membase =3D devm_platform_get_and_ioremap_resource(pdev, 0, &= res); 608 if (IS_ERR(port->membase)) 609 return dev_err_probe(&pdev->dev, PTR_ERR(port->membase), "membase = not found\n"); 610 = 611 irq =3D platform_get_irq(pdev, 0); 612 if (irq < 0) 613 return irq; 614 = 615 port->mapbase =3D res->start; 616 port->uartclk =3D clk_get_rate(sup->clk); 617 port->line =3D pdev->id; 618 port->irq =3D irq; 619 port->dev =3D &pdev->dev; 620 port->iotype =3D UPIO_MEM; 621 port->ops =3D &sunplus_uart_ops; 622 port->flags =3D UPF_BOOT_AUTOCONF; 623 port->fifosize =3D 128; 624 = 625 ret =3D reset_control_deassert(sup->rstc); 626 if (ret) 627 return ret; 628 = 629 ret =3D devm_add_action_or_reset(&pdev->dev, > 630 (void(*)(void *))reset_control_assert, 631 sup->rstc); 632 if (ret) 633 return ret; 634 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0229636336975837320==--