• P
    serial: reduce number of indirections in 8250 code · dfe42443
    Paul Gortmaker 提交于
    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: NPaul Gortmaker <paul.gortmaker@windriver.com>
    Acked-by: NAlan Cox <alan@linux.intel.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    dfe42443
8250.c 82.5 KB