Re: [RFC 3/3] nvme: wire up support for async passthrough

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/2/21 23:22, Kanchan Joshi wrote:
> +	if (!ioucmd)
> +		cptr = &c;
> +	else {
> +		/*for async - allocate cmd dynamically */
> +		cptr = kmalloc(sizeof(struct nvme_command), GFP_KERNEL);
> +		if (!cptr)
> +			return -ENOMEM;
> +	}
> +
> +	memset(cptr, 0, sizeof(c));
Why not kzalloc and remove memset() ?




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux