Re: [PATCH 4/9] tty: move TTY_IO_ERROR flag to tty_port iflags

From
One Thousand Gnomes <hidden>
Date
2016-09-11 21:18:26
Also in
lkml
Reply to
Rob Herring, 2016-09-09
On Fri,  9 Sep 2016 17:37:05 -0500
Rob Herring [off-list ref] 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
Thread (18 messages) 18 messages, 3 authors, last reply 2016-09-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help