Re: [PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-08 Thread Aleksey Makarov
On 03/08/2017 06:33 AM, Sergey Senozhatsky wrote: Hello, sorry for the delay. On (03/07/17 15:54), Aleksey Makarov wrote: On 03/06/2017 03:59 PM, Sergey Senozhatsky wrote: On (03/03/17 18:49), Aleksey Makarov wrote: [..] +static enum { CONSOLE_MATCH, CONSOLE_MATCH_RETURN,

Re: [PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-08 Thread Aleksey Makarov
On 03/08/2017 06:33 AM, Sergey Senozhatsky wrote: Hello, sorry for the delay. On (03/07/17 15:54), Aleksey Makarov wrote: On 03/06/2017 03:59 PM, Sergey Senozhatsky wrote: On (03/03/17 18:49), Aleksey Makarov wrote: [..] +static enum { CONSOLE_MATCH, CONSOLE_MATCH_RETURN,

Re: [PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-07 Thread Sergey Senozhatsky
Hello, sorry for the delay. On (03/07/17 15:54), Aleksey Makarov wrote: > On 03/06/2017 03:59 PM, Sergey Senozhatsky wrote: > > On (03/03/17 18:49), Aleksey Makarov wrote: > > [..] > > > +static enum { CONSOLE_MATCH, CONSOLE_MATCH_RETURN, CONSOLE_MATCH_NEXT } > > > +match_console(struct console

Re: [PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-07 Thread Sergey Senozhatsky
Hello, sorry for the delay. On (03/07/17 15:54), Aleksey Makarov wrote: > On 03/06/2017 03:59 PM, Sergey Senozhatsky wrote: > > On (03/03/17 18:49), Aleksey Makarov wrote: > > [..] > > > +static enum { CONSOLE_MATCH, CONSOLE_MATCH_RETURN, CONSOLE_MATCH_NEXT } > > > +match_console(struct console

Re: [PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-07 Thread Aleksey Makarov
On 03/06/2017 03:59 PM, Sergey Senozhatsky wrote: On (03/03/17 18:49), Aleksey Makarov wrote: [..] +static enum { CONSOLE_MATCH, CONSOLE_MATCH_RETURN, CONSOLE_MATCH_NEXT } +match_console(struct console *newcon, struct console_cmdline *c) that enum in function return is interesting :) can we

Re: [PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-07 Thread Aleksey Makarov
On 03/06/2017 03:59 PM, Sergey Senozhatsky wrote: On (03/03/17 18:49), Aleksey Makarov wrote: [..] +static enum { CONSOLE_MATCH, CONSOLE_MATCH_RETURN, CONSOLE_MATCH_NEXT } +match_console(struct console *newcon, struct console_cmdline *c) that enum in function return is interesting :) can we

Re: [PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-06 Thread Sergey Senozhatsky
On (03/03/17 18:49), Aleksey Makarov wrote: [..] > +static enum { CONSOLE_MATCH, CONSOLE_MATCH_RETURN, CONSOLE_MATCH_NEXT } > +match_console(struct console *newcon, struct console_cmdline *c) that enum in function return is interesting :) can we make it less hackish? > + if (!newcon->match

Re: [PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-06 Thread Sergey Senozhatsky
On (03/03/17 18:49), Aleksey Makarov wrote: [..] > +static enum { CONSOLE_MATCH, CONSOLE_MATCH_RETURN, CONSOLE_MATCH_NEXT } > +match_console(struct console *newcon, struct console_cmdline *c) that enum in function return is interesting :) can we make it less hackish? > + if (!newcon->match

[PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-03 Thread Aleksey Makarov
If a console was specified by ACPI SPCR table _and_ command line parameters like "console=ttyAMA0" _and_ "earlycon" were specified, then log messages appear twice. The root cause is that the code traverses the list of specified consoles (the `console_cmdline` array) and stops at the first match.

[PATCH v3 3/3] printk: fix double printing with earlycon

2017-03-03 Thread Aleksey Makarov
If a console was specified by ACPI SPCR table _and_ command line parameters like "console=ttyAMA0" _and_ "earlycon" were specified, then log messages appear twice. The root cause is that the code traverses the list of specified consoles (the `console_cmdline` array) and stops at the first match.