diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-06-15 05:45:54 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-06-17 16:51:19 +0300 |
commit | eff4423ec0b03fedb8b7b420549ed8e424d246f1 (patch) | |
tree | e7f327568ecb3f11f55abaa2083c3e687282595a | |
parent | bfa9d1222d6185a4aea603ebc7d74d75c747087c (diff) | |
download | linux-eff4423ec0b03fedb8b7b420549ed8e424d246f1.tar.xz |
nvme-fabrics: remove memset in connect io q
Declare and initialize structure variable to the zero values so that we
can get rid of the zeroout memset call.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/nvme/host/fabrics.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index 43c797e3380b..1e6a7cc056ca 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -429,12 +429,11 @@ EXPORT_SYMBOL_GPL(nvmf_connect_admin_queue); */ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid, bool poll) { - struct nvme_command cmd; + struct nvme_command cmd = { }; struct nvmf_connect_data *data; union nvme_result res; int ret; - memset(&cmd, 0, sizeof(cmd)); cmd.connect.opcode = nvme_fabrics_command; cmd.connect.fctype = nvme_fabrics_type_connect; cmd.connect.qid = cpu_to_le16(qid); |