[PATCH 1/2] nvme: update nvme_cancel_io() a bit

Ming Lin mlin at kernel.org
Wed May 18 13:23:18 PDT 2016


On Wed, May 18, 2016 at 8:11 AM, Keith Busch <keith.busch at intel.com> wrote:
> On Tue, May 17, 2016 at 10:56:58PM -0700, Ming Lin wrote:
>>  static void nvme_cancel_io(struct request *req, void *data, bool reserved)
>>  {
>> +     struct nvme_ctrl *ctrl = data;
>>       int status;
>>
>>       if (!blk_mq_request_started(req))
>>               return;
>>
>> -     dev_dbg_ratelimited(((struct nvme_dev *) data)->ctrl.device,
>> -                             "Cancelling I/O %d", req->tag);
>> +     dev_dbg_ratelimited(ctrl->device, "Cancelling I/O %d", req->tag);
>
> Since you're not using ctrl for anything but the debug print, you
> should remove declaring it and instead do like what's currently there.
> This way the driver doesn't produce an unused variable warning in some
> kernel configurations. See commit 7e197930 that fixed this before.

Will update. Thanks.

>
> Otherwise, looks fine.



More information about the Linux-nvme mailing list