From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932516AbcIKVS0 (ORCPT ); Sun, 11 Sep 2016 17:18:26 -0400 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:57952 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932233AbcIKVSX (ORCPT ); Sun, 11 Sep 2016 17:18:23 -0400 Date: Sun, 11 Sep 2016 22:18:05 +0100 From: One Thousand Gnomes To: Rob Herring Cc: Alan Cox , Greg Kroah-Hartman , Jiri Slaby , Peter Hurley , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH 4/9] tty: move TTY_IO_ERROR flag to tty_port iflags Message-ID: <20160911221805.36c8a954@lxorguk.ukuu.org.uk> In-Reply-To: <20160909223711.26238-5-robh@kernel.org> References: <20160909223711.26238-1-robh@kernel.org> <20160909223711.26238-5-robh@kernel.org> Organization: Intel Corporation X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Sep 2016 17:37:05 -0500 Rob Herring 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