On Thu, Mar 12, 2015 at 01:21:59AM -0700, Sören Brinkmann wrote: > On Thu, 2015-03-12 at 09:07AM +0100, Thomas Betker wrote: > > From: Thomas Betker <thomas.betker@xxxxxxxxxxxxxxxxx> > > > > cdns_uart_readl() and cdns_uart_writel() depend on a local variable > > 'struct uart_port *port' as a hidden parameter. This is discouraged by > > the kernel coding rules for good reason, so fix it. > > > > The patch was created by a simple search-and-replace, plus breaking > > some lines longer than 80 columns: > > * s/cdns_uart_readl(/cdns_uart_readl(port, /g > > * s/cdns_uart_writel(/cdns_uart_writel(port, /g > > > > Signed-off-by: Thomas Betker <thomas.betker@xxxxxxxxxxxxxxxxx> > > --- > > drivers/tty/serial/xilinx_uartps.c | 203 +++++++++++++++++++----------------- > > 1 file changed, 107 insertions(+), 96 deletions(-) > > > > diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c > > index 392d636..1ff06eb 100644 > > --- a/drivers/tty/serial/xilinx_uartps.c > > +++ b/drivers/tty/serial/xilinx_uartps.c > > @@ -39,8 +39,8 @@ > > #define CDNS_UART_FIFO_SIZE 64 /* FIFO size */ > > #define CDNS_UART_REGISTER_SPACE 0x1000 > > > > -#define cdns_uart_readl(offset) ioread32(port->membase + offset) > > -#define cdns_uart_writel(val, offset) iowrite32(val, port->membase + offset) > > +#define cdns_uart_readl(up, reg) ioread32((up)->membase + (reg)) > > +#define cdns_uart_writel(up, val, reg) iowrite32(val, (up)->membase + (reg)) > > IMHO, we could get rid of this indirection layer completely and just > directly call io(read|write). Yes please, no need for hiding this type of thing everywhere. greg k-h -- 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