serial: reduce number of indirections in 8250 code
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 9 Mar 2012 00:12:11 +0000 (19:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2012 20:47:56 +0000 (12:47 -0800)
commitdfe42443ea1d30c98db59b7b1f914bc147d31336
tree479554def3fb2d90592f229e47f06e354aac1e35
parent0d263a264c4b8376ccf33248f6fac873310e5e05
serial: reduce number of indirections in 8250 code

The serial_8250_port struct contains within a serial_port struct
and many times one or the other, or both are in scope within
functions via a passed in arg, or via container_of.

However there are a lot of cases where we have access directly
to the port pointer, but yet go through the parent 8250_port
structure instead to get it.  These should just use the port
struct directly.

Similarly there are cases where it makes sense (from a code
cleanliness point of view) to declare a local for the port
struct, so we aren't going through the parent 8250_port struct
repeatedly to get to it.

We get a small reduction in text size, but it appears that
gcc was smart enough to internally be doing most of this
already, so the readability improvement is the larger gain.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250.c