On 2024-10-30, Jiri Slaby <jirislaby@xxxxxxxxxx> wrote: >> -static void univ8250_console_write(struct console *co, const char *s, >> - unsigned int count) >> +static void univ8250_console_write_atomic(struct console *co, > > Once 'co'. >> +static void univ8250_console_write_thread(struct console *co, > > Second time co. >> +static void univ8250_console_device_lock(struct console *con, unsigned long *flags) > > And suddenly, it is 'con'. Sorry. The printk folks like "con". The 8250 folks seem to like "co". I will switch to "co" for the 8250 changes. >> static void serial8250_console_putchar(struct uart_port *port, unsigned char ch) >> { >> + struct uart_8250_port *up = up_to_u8250p(port); >> + >> serial_port_out(port, UART_TX, ch); >> + >> + if (ch == '\n') >> + up->console_line_ended = true; >> + else >> + up->console_line_ended = false; > > So simply: > up->console_line_ended = ch == '\n'; OK, although I would also add parenthesis to make the inline boolean evaluation visually more obvious: up->console_line_ended = (ch == '\n'); >> /* >> - * First save the IER then disable the interrupts >> + * First save IER then disable the interrupts. The special variant > > When you are at it: > "First, save the IER, then" OK. > (BTW why did you remove the "the"?) If IER is the name of a register, the "the" is inappropriate. If IER is just an abbreviation for "interrupt enable register" then the "the" is correct. In this case, both are correct, so it depends on how you read it. ;-) Anyway, I have no problems leaving the "the" in place. >> + up->console_line_ended = true; >> + up->modem_status_work = IRQ_WORK_INIT(modem_status_handler); > > Looks weird ^^^. > > Do: > init_irq_work(&up->modem_status_work, modem_status_handler) Right. Thanks. John