From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: <linux-nvme@lists.infradead.org>
Cc: <hch@lst.de>, <sagi@grimberg.me>, Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH 1/5] nvme-fabrics: use consistent zeroout pattern
Date: Tue, 11 Jan 2022 22:20:57 -0800 [thread overview]
Message-ID: <20220112062101.90102-2-chaitanyak@nvidia.com> (raw)
In-Reply-To: <20220112062101.90102-1-chaitanyak@nvidia.com>
From: Chaitanya Kulkarni <kch@nvidia.com>
Remove zeroout memeset call & zeroout local variable cmd at the time
of declaration in nvmf_ref_read32() similar to what we have done in
nvmf_reg_read64(), nvmf_reg_write32(), nvmf_connect_admin_queue(), and
nvmf_connect_io_queue().
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
drivers/nvme/host/fabrics.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 7ae041e2b3fb..a0640986add9 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -144,11 +144,10 @@ EXPORT_SYMBOL_GPL(nvmf_get_address);
*/
int nvmf_reg_read32(struct nvme_ctrl *ctrl, u32 off, u32 *val)
{
- struct nvme_command cmd;
+ struct nvme_command cmd = { };
union nvme_result res;
int ret;
- memset(&cmd, 0, sizeof(cmd));
cmd.prop_get.opcode = nvme_fabrics_command;
cmd.prop_get.fctype = nvme_fabrics_type_property_get;
cmd.prop_get.offset = cpu_to_le32(off);
--
2.29.0
next prev parent reply other threads:[~2022-01-12 6:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 6:20 [PATCH 0/5] nvme-fabrics: small cleanup Chaitanya Kulkarni
2022-01-12 6:20 ` Chaitanya Kulkarni [this message]
2022-01-13 16:15 ` [PATCH 1/5] nvme-fabrics: use consistent zeroout pattern Keith Busch
2022-01-12 6:20 ` [PATCH 2/5] nvme-fabrics: remove unnecessary braces for case Chaitanya Kulkarni
2022-01-13 16:16 ` Keith Busch
2022-01-12 6:20 ` [PATCH 3/5] nvme-fabrics: use unsigned int type Chaitanya Kulkarni
2022-01-12 11:41 ` Max Gurtovoy
2022-01-13 16:20 ` Keith Busch
2022-01-12 6:21 ` [PATCH 4/5] " Chaitanya Kulkarni
2022-01-12 6:21 ` [PATCH 5/5] nvme-fabrics: set ret to -ENODEV for error case Chaitanya Kulkarni
2022-01-13 16:28 ` Keith Busch
2022-01-17 8:50 ` Chaitanya Kulkarni
2022-01-19 6:26 ` Sagi Grimberg
2022-01-19 7:40 ` Chaitanya Kulkarni
2022-01-19 11:24 ` Sagi Grimberg
2022-01-26 16:32 ` [PATCH 0/5] nvme-fabrics: small cleanup 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=20220112062101.90102-2-chaitanyak@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=hch@lst.de \
--cc=kch@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.