* [PATCH] serial/arc: Fix warning with CONSOLE_POLL
[not found] <53bf1d9a.l51qTAII/GCO14wJ%fengguang.wu@intel.com>
@ 2014-07-11 13:01 ` Vineet Gupta
2014-07-12 0:48 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Vineet Gupta @ 2014-07-11 13:01 UTC (permalink / raw)
To: gregkh; +Cc: linux-serial, Vineet Gupta
| drivers/tty/serial/arc_uart.c:516:2: warning: (near initialization for 'arc_serial_pops.poll_put_char') [enabled by default]
This partially undoes "serial/arc: use uart_console_write() helper" by
restoring the prototpye of poll helper and use a different one in
uart_console_write()
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
drivers/tty/serial/arc_uart.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index d9900cb3e7b6..750638fc8a4a 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -449,18 +449,16 @@ static void arc_serial_config_port(struct uart_port *port, int flags)
port->type = PORT_ARC;
}
-#if defined(CONFIG_CONSOLE_POLL) || defined(CONFIG_SERIAL_ARC_CONSOLE)
+#ifdef CONFIG_CONSOLE_POLL
-static void arc_serial_poll_putchar(struct uart_port *port, int chr)
+static void arc_serial_poll_putchar(struct uart_port *port, unsigned char chr)
{
while (!(UART_GET_STATUS(port) & TXEMPTY))
cpu_relax();
- UART_SET_DATA(port, (unsigned char)chr);
+ UART_SET_DATA(port, chr);
}
-#endif
-#ifdef CONFIG_CONSOLE_POLL
static int arc_serial_poll_getchar(struct uart_port *port)
{
unsigned char chr;
@@ -527,6 +525,14 @@ static int arc_serial_console_setup(struct console *co, char *options)
return uart_set_options(port, co, baud, parity, bits, flow);
}
+static void arc_serial_console_putchar(struct uart_port *port, int ch)
+{
+ while (!(UART_GET_STATUS(port) & TXEMPTY))
+ cpu_relax();
+
+ UART_SET_DATA(port, (unsigned char)ch);
+}
+
/*
* Interrupts are disabled on entering
*/
@@ -537,7 +543,7 @@ static void arc_serial_console_write(struct console *co, const char *s,
unsigned long flags;
spin_lock_irqsave(&port->lock, flags);
- uart_console_write(port, s, count, arc_serial_poll_putchar);
+ uart_console_write(port, s, count, arc_serial_console_putchar);
spin_unlock_irqrestore(&port->lock, flags);
}
@@ -556,7 +562,7 @@ static __init void arc_early_serial_write(struct console *con, const char *s,
{
struct earlycon_device *dev = con->data;
- uart_console_write(&dev->port, s, n, arc_serial_poll_putchar);
+ uart_console_write(&dev->port, s, n, arc_serial_console_putchar);
}
static int __init arc_early_console_setup(struct earlycon_device *dev,
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] serial/arc: Fix warning with CONSOLE_POLL
2014-07-11 13:01 ` [PATCH] serial/arc: Fix warning with CONSOLE_POLL Vineet Gupta
@ 2014-07-12 0:48 ` Greg KH
2014-07-12 7:45 ` Vineet Gupta
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2014-07-12 0:48 UTC (permalink / raw)
To: Vineet Gupta; +Cc: linux-serial
On Fri, Jul 11, 2014 at 06:31:37PM +0530, Vineet Gupta wrote:
> | drivers/tty/serial/arc_uart.c:516:2: warning: (near initialization for 'arc_serial_pops.poll_put_char') [enabled by default]
>
> This partially undoes "serial/arc: use uart_console_write() helper" by
> restoring the prototpye of poll helper and use a different one in
> uart_console_write()
>
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
You forgot a "Reported-by:" line here.
I'll go add it...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial/arc: Fix warning with CONSOLE_POLL
2014-07-12 0:48 ` Greg KH
@ 2014-07-12 7:45 ` Vineet Gupta
0 siblings, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2014-07-12 7:45 UTC (permalink / raw)
To: Greg KH; +Cc: linux-serial@vger.kernel.org
On Saturday 12 July 2014 06:13 AM, Greg KH wrote:
> On Fri, Jul 11, 2014 at 06:31:37PM +0530, Vineet Gupta wrote:
>> | drivers/tty/serial/arc_uart.c:516:2: warning: (near initialization for 'arc_serial_pops.poll_put_char') [enabled by default]
>>
>> This partially undoes "serial/arc: use uart_console_write() helper" by
>> restoring the prototpye of poll helper and use a different one in
>> uart_console_write()
>>
>> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> You forgot a "Reported-by:" line here.
>
> I'll go add it...
Sorry my bad - thx for taking care of this.
-Vineet
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-12 7:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <53bf1d9a.l51qTAII/GCO14wJ%fengguang.wu@intel.com>
2014-07-11 13:01 ` [PATCH] serial/arc: Fix warning with CONSOLE_POLL Vineet Gupta
2014-07-12 0:48 ` Greg KH
2014-07-12 7:45 ` Vineet Gupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox