Skip to content

Commit eff4423

Browse files
ChaitanayaKulkarniChristoph Hellwig
authored andcommitted
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>
1 parent bfa9d12 commit eff4423

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/nvme/host/fabrics.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,12 +429,11 @@ EXPORT_SYMBOL_GPL(nvmf_connect_admin_queue);
429429
*/
430430
int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid, bool poll)
431431
{
432-
struct nvme_command cmd;
432+
struct nvme_command cmd = { };
433433
struct nvmf_connect_data *data;
434434
union nvme_result res;
435435
int ret;
436436

437-
memset(&cmd, 0, sizeof(cmd));
438437
cmd.connect.opcode = nvme_fabrics_command;
439438
cmd.connect.fctype = nvme_fabrics_type_connect;
440439
cmd.connect.qid = cpu_to_le16(qid);

0 commit comments

Comments
 (0)