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>
This commit is contained in:
Chaitanya Kulkarni 2021-06-14 19:45:54 -07:00 коммит произвёл Christoph Hellwig
Родитель bfa9d1222d
Коммит eff4423ec0
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

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