Commit 7e197930 authored by Jens Axboe's avatar Jens Axboe

NVMe: silence warning about unused 'dev'

Depending on options, we might not be using dev in nvme_cancel_io():

drivers/nvme/host/pci.c: In function ‘nvme_cancel_io’:
drivers/nvme/host/pci.c:970:19: warning: unused variable ‘dev’ [-Wunused-variable]
  struct nvme_dev *dev = data;
                   ^

So get rid of it, and just cast for the dev_dbg_ratelimited() call.

Fixes: 82b4552b ("nvme: Use blk-mq helper for IO termination")
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 2245f6de
...@@ -967,13 +967,13 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) ...@@ -967,13 +967,13 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
static void nvme_cancel_io(struct request *req, void *data, bool reserved) static void nvme_cancel_io(struct request *req, void *data, bool reserved)
{ {
struct nvme_dev *dev = data;
int status; int status;
if (!blk_mq_request_started(req)) if (!blk_mq_request_started(req))
return; return;
dev_dbg_ratelimited(dev->ctrl.device, "Cancelling I/O %d", req->tag); dev_dbg_ratelimited(((struct nvme_dev *) data)->ctrl.device,
"Cancelling I/O %d", req->tag);
status = NVME_SC_ABORT_REQ; status = NVME_SC_ABORT_REQ;
if (blk_queue_dying(req->q)) if (blk_queue_dying(req->q))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment