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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri,  9 Sep 2016 17:37:05 -0500
Rob Herring <robh@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux