[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160911221805.36c8a954@lxorguk.ukuu.org.uk>
Date: Sun, 11 Sep 2016 22:18:05 +0100
From: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To: Rob Herring <robh@...nel.org>
Cc: Alan Cox <alan@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
Peter Hurley <peter@...leysoftware.com>,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH 4/9] tty: move TTY_IO_ERROR flag to tty_port iflags
On Fri, 9 Sep 2016 17:37:05 -0500
Rob Herring <robh@...nel.org> wrote:
> TTY_IO_ERROR is a property of the tty port rather than the tty, so move
> it to tty_port struct and remove another dependency on tty_struct from
> drivers.
>
> Partially converted with coccinelle:
>
> @@
> identifier t;
> identifier func;
> @@
> - func(TTY_IO_ERROR, &t->flags)
> + func(TTY_PORT_IO_ERROR, &t->port->iflags)
>
> @@
> expression port;
> identifier func;
> @@
> - func(TTY_IO_ERROR, &port.tty->flags)
> + func(TTY_PORT_IO_ERROR, &port.iflags)
Again this makes sense to move the object to the right structure.
I'm not convinced your recipe is a correct and reliable translation
because you don't capture the flag being cleared if the tty object is
freed and then a new one allocated. That needs further review IMHO
Alan
Powered by blists - more mailing lists