mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michal Simek <monstr@monstr.eu>
Cc: Michal Simek <michal.simek@xilinx.com>,
	<linux-kernel@vger.kernel.org>, <gnomes@lxorguk.ukuu.org.uk>,
	Alexander Graf <agraf@suse.de>, <shubhraj@xilinx.com>,
	<robh@kernel.org>, Jiri Slaby <jslaby@suse.com>,
	<linux-serial@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH v2 1/6] serial: uartps: Do not initialize field to zero again
Date: Wed, 27 Jun 2018 16:19:46 +0200	[thread overview]
Message-ID: <05e553c2-202b-0b4b-8b88-60e330c80fa3@xilinx.com> (raw)
In-Reply-To: <20180627100917.GA20940@kroah.com>

On 27.6.2018 12:09, Greg Kroah-Hartman wrote:
> On Tue, Jun 19, 2018 at 10:09:05AM +0200, Michal Simek wrote:
>> On 6.6.2018 14:41, Michal Simek wrote:
>>> Writing zero and NULLs to already initialized fields is not needed.
>>> Remove this additional writes.
>>>
>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>> ---
>>>
>>> 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" :)

There is one missing minor part but I want to review concept first
because I didn't find any driver which is using this style.

> If you think this is all good, great, please resend it without the RFC
> and it will end up in my queue.

I will definitely do it but please look at the concept itself because I
would like to use this with at least 3 other drivers.

Thanks,
Michal





  reply	other threads:[~2018-06-27 14:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 12:41 [RFC PATCH v2 0/6] serial: uartps: Add run time support for more IPs than hardcoded 2 Michal Simek
2018-06-06 12:41 ` [RFC PATCH v2 1/6] serial: uartps: Do not initialize field to zero again Michal Simek
2018-06-19  8:09   ` Michal Simek
2018-06-27 10:09     ` Greg Kroah-Hartman
2018-06-27 14:19       ` Michal Simek [this message]
2018-06-27 23:48         ` Greg Kroah-Hartman
2018-06-28  7:18           ` Michal Simek
2018-06-06 12:41 ` [RFC PATCH v2 2/6] serial: uartps: Move register to probe based on run time detection Michal Simek
2018-06-06 12:41 ` [RFC PATCH v2 3/6] serial: uartps: Do not use static struct uart_driver out of probe() Michal Simek
2018-06-06 12:41 ` [RFC PATCH v2 4/6] serial: uartps: Move alias reading higher in probe() Michal Simek
2018-06-06 12:41 ` [RFC PATCH v2 5/6] serial: uartps: Fill struct uart_driver " Michal Simek
2018-06-06 12:41 ` [RFC PATCH v2 6/6] serial: uartps: Remove CDNS_UART_NR_PORTS macro Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05e553c2-202b-0b4b-8b88-60e330c80fa3@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=agraf@suse.de \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=robh@kernel.org \
    --cc=shubhraj@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome