diff mbox

serial: xuartps: add __init to earlycon write method

Message ID 1430989359-4364-1-git-send-email-yamada.masahiro@socionext.com (mailing list archive)
State New, archived
Headers show

Commit Message

Masahiro Yamada May 7, 2015, 9:02 a.m. UTC
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/tty/serial/xilinx_uartps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Arnd Bergmann May 7, 2015, 9:08 a.m. UTC | #1
On Thursday 07 May 2015 18:02:39 Masahiro Yamada wrote:
> @@ -1075,7 +1075,8 @@ static void cdns_uart_console_putchar(struct uart_port *port, int ch)
>         writel(ch, port->membase + CDNS_UART_FIFO_OFFSET);
>  }
>  
> -static void cdns_early_write(struct console *con, const char *s, unsigned n)
> +static void __init cdns_early_write(struct console *con, const char *s,
> +                                   unsigned n)
>  {
>         struct earlycon_device *dev = con->data;
>  
> 

Why?

	Arnd
Masahiro Yamada May 7, 2015, 9:14 a.m. UTC | #2
Hi Arnd,

2015-05-07 18:08 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> On Thursday 07 May 2015 18:02:39 Masahiro Yamada wrote:
>> @@ -1075,7 +1075,8 @@ static void cdns_uart_console_putchar(struct uart_port *port, int ch)
>>         writel(ch, port->membase + CDNS_UART_FIFO_OFFSET);
>>  }
>>
>> -static void cdns_early_write(struct console *con, const char *s, unsigned n)
>> +static void __init cdns_early_write(struct console *con, const char *s,
>> +                                   unsigned n)
>>  {
>>         struct earlycon_device *dev = con->data;
>>
>>
>
> Why?
>

I thought this function is used during the early boot stage.

I am seeing drivers/tty/serial/8250/8250_early.c
for reference.

All the functions in this file are marked as __init.

Perhaps, am I misunderstanding?
Arnd Bergmann May 7, 2015, 9:27 a.m. UTC | #3
On Thursday 07 May 2015 18:14:43 you wrote:
> 2015-05-07 18:08 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> > On Thursday 07 May 2015 18:02:39 Masahiro Yamada wrote:
> >> @@ -1075,7 +1075,8 @@ static void cdns_uart_console_putchar(struct uart_port *port, int ch)
> >>         writel(ch, port->membase + CDNS_UART_FIFO_OFFSET);
> >>  }
> >>
> >> -static void cdns_early_write(struct console *con, const char *s, unsigned n)
> >> +static void __init cdns_early_write(struct console *con, const char *s,
> >> +                                   unsigned n)
> >>  {
> >>         struct earlycon_device *dev = con->data;
> >>
> >>
> >
> > Why?
> >
> 
> I thought this function is used during the early boot stage.
> 
> I am seeing drivers/tty/serial/8250/8250_early.c
> for reference.
> 
> All the functions in this file are marked as __init.
> 
> Perhaps, am I misunderstanding?
> 

Makes sense, please explain that in the commit message and send the
patch again.

	Arnd
diff mbox

Patch

diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 3ddbac7..009e0db 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1075,7 +1075,8 @@  static void cdns_uart_console_putchar(struct uart_port *port, int ch)
 	writel(ch, port->membase + CDNS_UART_FIFO_OFFSET);
 }
 
-static void cdns_early_write(struct console *con, const char *s, unsigned n)
+static void __init cdns_early_write(struct console *con, const char *s,
+				    unsigned n)
 {
 	struct earlycon_device *dev = con->data;