From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH] nvme-core: small cleanups
Date: Tue, 4 Dec 2018 14:26:02 -0800 [thread overview]
Message-ID: <20181204222602.GA12719@infradead.org> (raw)
In-Reply-To: <1543876976.185366.175.camel@acm.org>
On Mon, Dec 03, 2018@02:42:56PM -0800, Bart Van Assche wrote:
> On Thu, 2018-11-29@09:18 -0800, Chaitanya Kulkarni wrote:
> > static int nvme_identify_ctrl(struct nvme_ctrl *dev, struct nvme_id_ctrl **id)
> > {
> > - struct nvme_command c = { };
> > + struct nvme_command c;
> > int error;
> >
> > + memset(&c, 0, sizeof(c));
>
> Please drop this and all similar changes. I think the preferred style in the Linux
> kernel for structure initialization is to use "= { }" instead of memset().
I defintively prefer it. But I don't think changing things either
way is really worth the effort anyway unless you change the surrounding
code to start with.
next prev parent reply other threads:[~2018-12-04 22:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 17:18 [PATCH] nvme-core: small cleanups Chaitanya Kulkarni
2018-12-03 10:13 ` Johannes Thumshirn
2018-12-03 22:26 ` Chaitanya Kulkarni
2018-12-03 22:42 ` Bart Van Assche
2018-12-04 0:33 ` Sagi Grimberg
2018-12-04 22:26 ` Christoph Hellwig [this message]
2018-12-04 22:37 ` Keith Busch
2018-12-05 2:33 ` Bart Van Assche
2018-12-04 22:27 ` Christoph Hellwig
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=20181204222602.GA12719@infradead.org \
--to=hch@infradead.org \
/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