All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
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	[thread overview]
Message-ID: <202202071924.YLKjNyyr-lkp@intel.com> (raw)
In-Reply-To: <1644213481-20321-3-git-send-email-hammerh0314@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6917 bytes --]

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-driver-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=1 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/423c8dea29f94c6fe20e3864a2424e7bc4b79b27
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Hammer-Hsieh/Add-UART-driver-for-Suplus-SP7021-SoC/20220207-144451
        git checkout 423c8dea29f94c6fe20e3864a2424e7bc4b79b27
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/tty/serial/

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

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 incompatible function types from 'int (*)(struct reset_control *)' to 'void (*)(void *)' [-Wcast-function-type]
     630 |                                        (void(*)(void *))reset_control_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 'module_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 'console_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 'module_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 'console_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 = of_alias_get_id(pdev->dev.of_node, "serial");
   579	
   580		if (pdev->id < 0 || pdev->id >= SUP_UART_NR)
   581			return -EINVAL;
   582	
   583		sup = devm_kzalloc(&pdev->dev, sizeof(*sup), GFP_KERNEL);
   584		if (!sup)
   585			return -ENOMEM;
   586	
   587		sup->clk = 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 = clk_prepare_enable(sup->clk);
   592		if (ret)
   593			return ret;
   594	
   595		ret = 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 = 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 found\n");
   604	
   605		port = &sup->port;
   606	
   607		port->membase = 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 = platform_get_irq(pdev, 0);
   612		if (irq < 0)
   613			return irq;
   614	
   615		port->mapbase = res->start;
   616		port->uartclk = clk_get_rate(sup->clk);
   617		port->line = pdev->id;
   618		port->irq = irq;
   619		port->dev = &pdev->dev;
   620		port->iotype = UPIO_MEM;
   621		port->ops = &sunplus_uart_ops;
   622		port->flags = UPF_BOOT_AUTOCONF;
   623		port->fifosize = 128;
   624	
   625		ret = reset_control_deassert(sup->rstc);
   626		if (ret)
   627			return ret;
   628	
   629		ret = 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

  parent reply	other threads:[~2022-02-07 11:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  5:57 [PATCH v7 0/2] Add UART driver for Suplus SP7021 SoC Hammer Hsieh
2022-02-07  5:58 ` [PATCH v7 1/2] dt-bindings:serial:Add bindings doc for Sunplus SoC UART Driver Hammer Hsieh
2022-02-07  5:58 ` [PATCH v7 2/2] serial:sunplus-uart:Add " Hammer Hsieh
2022-02-07  7:18   ` Greg KH
2022-02-07 11:28     ` hammer hsieh
2022-02-07 11:43   ` kernel test robot [this message]
2022-02-07 12:14   ` kernel test robot
2022-02-08  6:27   ` Jiri Slaby
2022-02-08 11:16     ` hammer hsieh
2022-02-08 11:31       ` Greg KH
2022-02-09 10:53         ` hammer hsieh

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=202202071924.YLKjNyyr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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.