linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: define struct for __nvme_submit_sync_cmd()
Date: Fri, 4 Oct 2019 17:09:33 -0700	[thread overview]
Message-ID: <0adce3dc-63ad-5302-4486-d6d840b42ee0@grimberg.me> (raw)
In-Reply-To: <20191001231346.18518-1-chaitanya.kulkarni@wdc.com>


> 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?

[...]

> @@ -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

  parent reply	other threads:[~2019-10-05  0: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 [this message]
2019-10-05  2:09   ` Balbir Singh
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=0adce3dc-63ad-5302-4486-d6d840b42ee0@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=chaitanya.kulkarni@wdc.com \
    --cc=linux-nvme@lists.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;
as well as URLs for NNTP newsgroup(s).