From: Balbir Singh <bsingharora@gmail.com>
To: Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: define struct for __nvme_submit_sync_cmd()
Date: Fri, 04 Oct 2019 19:09:06 -0700 [thread overview]
Message-ID: <d31f20ae63a5f40c04ac4860f5ebc8ac3d159f8a.camel@gmail.com> (raw)
In-Reply-To: <0adce3dc-63ad-5302-4486-d6d840b42ee0@grimberg.me>
On Fri, 2019-10-04 at 17:09 -0700, Sagi Grimberg wrote:
> > Over the period of time __nvme_submit_sync_cmd() function has grown to
> > accept large number of paratements. The function __nvme_submit_sync_cmd()
> > now takes 10 parameters. This patch consolidates all the parameters into
> > one defined structure.
> >
> > This makes calls to the same function easy to read and improves overall
> > code readability.
>
> Personally I'm not a big fan... But I'm not going to reject it either...
>
> What do others think?
>
> [...]
>
The patch itself is not the cleanest, smaller well defined refactoring would
be much better - at first glance
Balbir Singh.
> > @@ -366,10 +398,25 @@ static void nvmf_log_connect_error(struct nvme_ctrl
> > *ctrl,
> > */
> > int nvmf_connect_admin_queue(struct nvme_ctrl *ctrl)
> > {
> > + struct nvmf_connect_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
>
> Please don't. I'm allergic to allocation on declaration.
> Just set d.buffer after the initializer.
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2019-10-05 2:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 23:13 [PATCH] nvme: define struct for __nvme_submit_sync_cmd() Chaitanya Kulkarni
2019-10-02 5:47 ` Javier González
2019-10-02 6:10 ` Chaitanya Kulkarni
2019-10-05 14:48 ` Keith Busch
2019-10-06 10:13 ` Christoph Hellwig
2019-10-05 0:09 ` Sagi Grimberg
2019-10-05 2:09 ` Balbir Singh [this message]
2019-10-06 10:12 ` 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=d31f20ae63a5f40c04ac4860f5ebc8ac3d159f8a.camel@gmail.com \
--to=bsingharora@gmail.com \
--cc=chaitanya.kulkarni@wdc.com \
--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;
as well as URLs for NNTP newsgroup(s).