[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024041114-abide-ageless-d7d3@gregkh>
Date: Thu, 11 Apr 2024 06:38:36 +0200
From: Greg KH <greg@...ah.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"Jiri Slaby (SUSE)" <jirislaby@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: manual merge of the tty tree with the tty.current
tree
On Thu, Apr 11, 2024 at 02:17:11PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> On Thu, 11 Apr 2024 13:57:35 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> >
> > Today's linux-next merge of the tty tree got a conflict in:
> >
> > drivers/tty/serial/serial_core.c
> >
> > between commit:
> >
> > 9cf7ea2eeb74 ("serial: core: Clearing the circular buffer before NULLifying it")
> >
> > from the tty.current tree and commit:
> >
> > 1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo")
> >
> > from the tty tree.
> >
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging. You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> >
> > --
> > Cheers,
> > Stephen Rothwell
> >
> > diff --cc drivers/tty/serial/serial_core.c
> > index 2247efe97250,a78ded8c60b5..000000000000
> > --- a/drivers/tty/serial/serial_core.c
> > +++ b/drivers/tty/serial/serial_core.c
> > @@@ -1788,9 -1773,9 +1773,10 @@@ static void uart_tty_port_shutdown(stru
> > * Free the transmit buffer.
> > */
> > uart_port_lock_irq(uport);
> > + uart_circ_clear(&state->xmit);
> > - buf = state->xmit.buf;
> > - state->xmit.buf = NULL;
> > + buf = port->xmit_buf;
> > + port->xmit_buf = NULL;
> > + INIT_KFIFO(port->xmit_fifo);
> > uart_port_unlock_irq(uport);
> >
> > free_page((unsigned long)buf);
>
> That didn't work :-(
>
> So I have used the below resolution instead.
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/tty/serial/serial_core.c
> index 2247efe97250,a78ded8c60b5..000000000000
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@@ -1788,9 -1773,9 +1773,10 @@@ static void uart_tty_port_shutdown(stru
> * Free the transmit buffer.
> */
> uart_port_lock_irq(uport);
> - uart_circ_clear(&state->xmit);
> - buf = state->xmit.buf;
> - state->xmit.buf = NULL;
> ++ kfifo_reset(&state->port.xmit_fifo);
> + buf = port->xmit_buf;
> + port->xmit_buf = NULL;
> + INIT_KFIFO(port->xmit_fifo);
> uart_port_unlock_irq(uport);
>
> free_page((unsigned long)buf);
Thank you for this, I will use it when the tty-linus changes are merged
with Linus's tree.
greg k-h
Powered by blists - more mailing lists