From: Jason Li <jason.li@cortina-access.com>
To: kbuild-all@lists.01.org
Subject: Re: [tty:tty-testing 218/218] drivers/tty/serial/serial_cortina-access.c:469:6: warning: no previous prototype for 'cortina_console_write'
Date: Sun, 20 Jun 2021 14:52:10 +0000 [thread overview]
Message-ID: < <HK0PR01MB2499A2741A76C6610A20773CA20B9@HK0PR01MB2499.apcprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <202106182351.TACYSsac-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 4244 bytes --]
Hi Greg,
I just fixed compile warning but fail to push to remote REPO:
fatal: unable to access 'https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git/': The requested URL returned error: 403
So I attach patch for you review.
Sincerely,
Jason
-----Original Message-----
From: kernel test robot <lkp@intel.com>
Sent: Friday, June 18, 2021 11:27 PM
To: Jason Li <jason.li@cortina-access.com>
Cc: kbuild-all(a)lists.01.org; linux-serial(a)vger.kernel.org; Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [tty:tty-testing 218/218] drivers/tty/serial/serial_cortina-access.c:469:6: warning: no previous prototype for 'cortina_console_write'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
head: b61c8bf4694b5115766849378dcb8787ff54e65e
commit: b61c8bf4694b5115766849378dcb8787ff54e65e [218/218] tty: serial: Add UART driver for Cortina-Access platform
config: m68k-allyesconfig (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/gregkh/tty.git/commit/?id=b61c8bf4694b5115766849378dcb8787ff54e65e
git remote add tty https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
git fetch --no-tags tty tty-testing
git checkout b61c8bf4694b5115766849378dcb8787ff54e65e
# 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 warnings (new ones prefixed by >>):
drivers/tty/serial/serial_cortina-access.c:76:27: warning: no previous prototype for 'cortina_uart_get_port' [-Wmissing-prototypes]
76 | struct cortina_uart_port *cortina_uart_get_port(unsigned int index)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/serial_cortina-access.c:469:6: warning: no
>> previous prototype for 'cortina_console_write' [-Wmissing-prototypes]
469 | void cortina_console_write(struct console *co, const char *s,
| ^~~~~~~~~~~~~~~~~~~~~
vim +/cortina_console_write +469 drivers/tty/serial/serial_cortina-access.c
467
468 #ifdef CONFIG_SERIAL_CORTINA_ACCESS_CONSOLE
> 469 void cortina_console_write(struct console *co, const char *s,
470 unsigned int count)
471 {
472 struct uart_port *port;
473 struct cortina_uart_port *pca_port;
474 unsigned int i, previous;
475 unsigned long flags;
476 int locked;
477
478 pca_port = cortina_uart_get_port(co->index);
479 port = &pca_port->uart;
480
481 local_irq_save(flags);
482 if (port->sysrq) {
483 locked = 0;
484 } else if (oops_in_progress) {
485 locked = spin_trylock(&port->lock);
486 } else {
487 spin_lock(&port->lock);
488 locked = 1;
489 }
490
491 /* Save current state */
492 previous = readl(port->membase + IE);
493 /* Disable Tx interrupts so this all goes out in one go */
494 cortina_uart_stop_tx(port);
495
496 /* Write all the chars */
497 for (i = 0; i < count; i++) {
498 /* Wait the TX buffer to be empty, which can't take forever */
499 while (!(readl(port->membase + INFO) & INFO_TX_EMPTY))
500 cpu_relax();
501
502 /* Send the char */
503 writel(*s, port->membase + TX_DAT);
504
505 /* CR/LF stuff */
506 if (*s++ == '\n') {
507 /* Wait the TX buffer to be empty */
508 while (!(readl(port->membase + INFO) & INFO_TX_EMPTY))
509 cpu_relax();
510 writel('\r', port->membase + TX_DAT);
511 }
512 }
513
514 writel(previous, port->membase + IE); /* Put it all back */
515
516 if (locked)
517 spin_unlock(&port->lock);
518 local_irq_restore(flags);
519 }
520
---
0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: 0001-CA_UART-Fix-compile-warning-in-new-GCC-toolchain.patch --]
[-- Type: application/octet-stream, Size: 1236 bytes --]
From c6ca41c89029c25c717741d4ed592a758e1a68cb Mon Sep 17 00:00:00 2001
From: Jason Li <jason.li@cortina-access.com>
Date: Sat, 19 Jun 2021 11:10:34 +0800
Subject: [PATCH] CA_UART: Fix compile warning in new GCC toolchain.
1. Declare prototype of cortina_uart_get_port()
2. Declare prototype of cortina_console_write()
Signed-off-by: Jason Li <jason.li@cortina-access.com>
---
drivers/tty/serial/serial_cortina-access.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/serial_cortina-access.c b/drivers/tty/serial/serial_cortina-access.c
index b4b9362bb4e6..132311659a67 100644
--- a/drivers/tty/serial/serial_cortina-access.c
+++ b/drivers/tty/serial/serial_cortina-access.c
@@ -71,7 +71,11 @@ struct cortina_uart_port {
static struct cortina_uart_port *cortina_uart_ports;
static irqreturn_t cortina_uart_interrupt(int irq, void *dev_id);
-
+struct cortina_uart_port *cortina_uart_get_port(unsigned int index);
+#ifdef CONFIG_SERIAL_CORTINA_ACCESS_CONSOLE
+void cortina_console_write(struct console *co, const char *s,
+ unsigned int count);
+#endif
/* Return uart_port pointer base on index */
struct cortina_uart_port *cortina_uart_get_port(unsigned int index)
{
--
2.20.1
prev parent reply other threads:[~2021-06-20 14:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 15:26 [tty:tty-testing 218/218] drivers/tty/serial/serial_cortina-access.c:469:6: warning: no previous prototype for 'cortina_console_write' kernel test robot
2021-06-18 15:26 ` kernel test robot
2021-06-20 14:52 ` Jason Li
2021-06-20 18:19 ` Greg Kroah-Hartman
2021-06-20 18:19 ` Greg Kroah-Hartman
2021-06-20 14:52 ` Jason Li [this message]
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=' <HK0PR01MB2499A2741A76C6610A20773CA20B9@HK0PR01MB2499.apcprd01.prod.exchangelabs.com' \
--to=jason.li@cortina-access.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.