nvme: factor request completion code into a common helper
authorChristoph Hellwig <hch@lst.de>
Thu, 30 Mar 2017 11:41:32 +0000 (13:41 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 4 Apr 2017 15:48:23 +0000 (09:48 -0600)
commit77f02a7acd7654cd5944f2120831d1eace94b343
treebee45db17a2a2f705c939f0769671008c3b3fda3
parent4bca70d0673927a8bef4b1de5fd8ddc735698a6b
nvme: factor request completion code into a common helper

This avoids duplicating the logic four times, and it also allows to keep
some helpers static in core.c or just opencode them.

Note that this loses printing the aborted status on completions in the
PCI driver as that uses a data structure not available any more.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c
drivers/nvme/host/fc.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/target/loop.c