]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
nvme-fabrics: remove memset in connect io q
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Tue, 15 Jun 2021 02:45:54 +0000 (19:45 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 17 Jun 2021 13:51:19 +0000 (15:51 +0200)
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>
drivers/nvme/host/fabrics.c

index 43c797e3380ba873d550fa6cff395984c5152ef1..1e6a7cc056cafb6c7f19414224913ad4a3da87e6 100644 (file)
@@ -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);