From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6503664832642228789==" 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 20:14:02 +0800 Message-ID: <202202072009.s4knQBpy-lkp@intel.com> In-Reply-To: <1644213481-20321-3-git-send-email-hammerh0314@gmail.com> List-Id: --===============6503664832642228789== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Hammer, I love your patch! Yet something to improve: [auto build test ERROR 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: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220= 207/202202072009.s4knQBpy-lkp(a)intel.com/config) compiler: powerpc-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=3Dpowerpc SHELL=3D/bin/bash drivers/tty/serial/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): drivers/tty/serial/sunplus-uart.c: In function 'sunplus_poll_put_char': >> drivers/tty/serial/sunplus-uart.c:436:9: error: implicit declaration of = function 'wait_for_xmitr'; did you mean 'wait_on_bit'? [-Werror=3Dimplicit-= function-declaration] 436 | wait_for_xmitr(port); | ^~~~~~~~~~~~~~ | wait_on_bit drivers/tty/serial/sunplus-uart.c: At top level: >> drivers/tty/serial/sunplus-uart.c:475:13: warning: conflicting types for= 'wait_for_xmitr'; have 'void(struct uart_port *)' 475 | static void wait_for_xmitr(struct uart_port *port) | ^~~~~~~~~~~~~~ >> drivers/tty/serial/sunplus-uart.c:475:13: error: static declaration of '= wait_for_xmitr' follows non-static declaration drivers/tty/serial/sunplus-uart.c:436:9: note: previous implicit declara= tion of 'wait_for_xmitr' with type 'void(struct uart_port *)' 436 | wait_for_xmitr(port); | ^~~~~~~~~~~~~~ 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 include/linux/device/driver.h:21, from include/linux/device.h:32, from arch/powerpc/include/asm/io.h:27, from include/linux/io.h:13, from include/linux/irq.h:20, from arch/powerpc/include/asm/hardirq.h:6, from include/linux/hardirq.h:11, from include/linux/interrupt.h:11, from drivers/tty/serial/sunplus-uart.c:10: 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); | ^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +436 drivers/tty/serial/sunplus-uart.c 432 = 433 #ifdef CONFIG_CONSOLE_POLL 434 static void sunplus_poll_put_char(struct uart_port *port, unsigned c= har data) 435 { > 436 wait_for_xmitr(port); 437 sp_uart_put_char(port, data); 438 } 439 = 440 static int sunplus_poll_get_char(struct uart_port *port) 441 { 442 unsigned int lsr =3D readl(port->membase + SUP_UART_LSR); 443 = 444 if (!(lsr & SUP_UART_LSR_RX)) 445 return NO_POLL_CHAR; 446 = 447 return readl(port->membase + SUP_UART_DATA); 448 } 449 #endif 450 = 451 static const struct uart_ops sunplus_uart_ops =3D { 452 .tx_empty =3D sunplus_tx_empty, 453 .set_mctrl =3D sunplus_set_mctrl, 454 .get_mctrl =3D sunplus_get_mctrl, 455 .stop_tx =3D sunplus_stop_tx, 456 .start_tx =3D sunplus_start_tx, 457 .stop_rx =3D sunplus_stop_rx, 458 .break_ctl =3D sunplus_break_ctl, 459 .startup =3D sunplus_startup, 460 .shutdown =3D sunplus_shutdown, 461 .set_termios =3D sunplus_set_termios, 462 .set_ldisc =3D sunplus_set_ldisc, 463 .type =3D sunplus_type, 464 .config_port =3D sunplus_config_port, 465 .verify_port =3D sunplus_verify_port, 466 #ifdef CONFIG_CONSOLE_POLL 467 .poll_put_char =3D sunplus_poll_put_char, 468 .poll_get_char =3D sunplus_poll_get_char, 469 #endif 470 }; 471 = 472 #ifdef CONFIG_SERIAL_SUNPLUS_CONSOLE 473 struct sunplus_uart_port *sunplus_console_ports[SUP_UART_NR]; 474 = > 475 static void wait_for_xmitr(struct uart_port *port) 476 { 477 unsigned int val; 478 int ret; 479 = 480 /* Wait while FIFO is full or timeout */ 481 ret =3D readl_poll_timeout_atomic(port->membase + SUP_UART_LSR, val, 482 (val & SUP_UART_LSR_TX), 1, 10000); 483 = 484 if (ret =3D=3D -ETIMEDOUT) { 485 dev_err(port->dev, "Timeout waiting while UART TX FULL\n"); 486 return; 487 } 488 } 489 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============6503664832642228789==--