[PATCH 3/3] nvme-pci: open-code polling logic in nvme_poll

Christoph Hellwig hch at lst.de
Fri Jun 16 00:05:48 PDT 2017


>  static int nvme_process_cq(struct nvme_queue *nvmeq)
>  {
> -	return __nvme_process_cq(nvmeq, INT_MAX, NULL);
> +	return __nvme_process_cq(nvmeq, INT_MAX);

At this point __nvme_process_cq and nvme_process_cq can be merged.

>  static int __nvme_poll(struct nvme_queue *nvmeq, unsigned int tag)
>  {
> +	struct nvme_completion cqe;
> +	int found = 0, consumed = 0;

found should be a bool.


Otherwise this looks fine to me.



More information about the Linux-nvme mailing list