public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Niklas Cassel <Niklas.Cassel@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>,
	Jens Axboe <axboe@fb.com>, Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] remove workarounds for gcc bug wrt unnamed fields in initializers
Date: Wed, 24 Jun 2020 19:02:11 +0200	[thread overview]
Message-ID: <20200624170211.GA25230@lst.de> (raw)
In-Reply-To: <20200624165746.GA394355@localhost.localdomain>

On Wed, Jun 24, 2020 at 04:57:48PM +0000, Niklas Cassel wrote:
> On Wed, Jun 24, 2020 at 06:44:41PM +0200, Christoph Hellwig wrote:
> > This looks good to me, but I'd rather wait a few releases to
> > avoid too mush backporting pain.
> 
> Chaitanya made me realize that about half of the nvme functions
> are using "struct nvme_command c" on the stack, and then memsets
> it, and half of the nvme functions are using an initializer.
> 
> IMHO, using an initializer is more clear.
> 
> memset has to be used if the function needs to reset an
> existing struct, but in none of the functions that I've seen,
> are we given an existing nvme_command that we need to reset.
> All the functions that I've seen declares a new nvme_command
> on the stack (so an initializer makes more sense).
> 
> What do you think about me unifying this later on?

I like the initializers a lot.  But as I said I'd rather wait a
bit for now.

  reply	other threads:[~2020-06-24 17:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 20:02 [PATCH v2 0/2] remove workarounds for gcc bug wrt unnamed fields in initializers Niklas Cassel
2020-06-18 20:02 ` [PATCH v2 1/2] nvme: " Niklas Cassel
2020-06-18 20:02 ` [PATCH v2 2/2] nvmet: " Niklas Cassel
2020-06-24 16:44 ` [PATCH v2 0/2] " Christoph Hellwig
2020-06-24 16:57   ` Niklas Cassel
2020-06-24 17:02     ` Christoph Hellwig [this message]
2020-06-24 17:08       ` Niklas Cassel
2020-06-24 22:40   ` Chaitanya Kulkarni
2020-06-25 11:10     ` Niklas Cassel

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=20200624170211.GA25230@lst.de \
    --to=hch@lst.de \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=Niklas.Cassel@wdc.com \
    --cc=axboe@fb.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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