Re: [RFC PATCH v2 1/6] serial: uartps: Do not initialize field to zero again
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2018-06-27 12:03:27
Also in:
linux-arm-kernel, lkml
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2018-06-27 12:03:27
Also in:
linux-arm-kernel, lkml
On Tue, Jun 19, 2018 at 10:09:05AM +0200, Michal Simek wrote:
On 6.6.2018 14:41, Michal Simek wrote:quoted
Writing zero and NULLs to already initialized fields is not needed. Remove this additional writes. Signed-off-by: Michal Simek <redacted> --- Changes in v2: - new patch - it can be sent separately too drivers/tty/serial/xilinx_uartps.c | 3 --- 1 file changed, 3 deletions(-)diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 8a3e34234e98..5f116f3ecd4a 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c@@ -1510,15 +1510,12 @@ static int cdns_uart_probe(struct platform_device *pdev) /* At this point, we've got an empty uart_port struct, initialize it */ spin_lock_init(&port->lock); - port->membase = NULL; - port->irq = 0; port->type = PORT_UNKNOWN; port->iotype = UPIO_MEM32; port->flags = UPF_BOOT_AUTOCONF; port->ops = &cdns_uart_ops; port->fifosize = CDNS_UART_FIFO_SIZE; port->line = id; - port->dev = NULL; /* * Register the port.Alan, Rob, Greg: Any comment about this RFC?
I rarely review RFC patchesets as obviously you don't think it is good enough to be submitted "for real" :) If you think this is all good, great, please resend it without the RFC and it will end up in my queue. thanks, greg k-h