From: Jens Axboe Date: Tue, 12 Apr 2016 22:11:11 +0000 (-0600) Subject: NVMe: silence warning about unused 'dev' X-Git-Tag: v4.1.12-102.0.20170601_1400~95 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9f8504883c90a301a5c5b06891638ea9064b7e69;p=users%2Fjedix%2Flinux-maple.git 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: 82b4552b91c4 ("nvme: Use blk-mq helper for IO termination") Signed-off-by: Jens Axboe (cherry picked from commit 7e19793096994d43d213f440f4bbea926828a727) Orabug: 25130845 Signed-off-by: Ashok Vairavan Reviewed-by: Martin K. Petersen --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 80e28468eebef..781d8ec2cd1b1 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1009,13 +1009,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) { - struct nvme_dev *dev = data; int status; if (!blk_mq_request_started(req)) 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; if (blk_queue_dying(req->q))