block: change request end_io handler to pass back a return value
[platform/kernel/linux-starfive.git] / drivers / nvme / host / core.c
index 0f05b61..965a4c3 100644 (file)
@@ -1172,7 +1172,8 @@ static void nvme_queue_keep_alive_work(struct nvme_ctrl *ctrl)
        queue_delayed_work(nvme_wq, &ctrl->ka_work, ctrl->kato * HZ / 2);
 }
 
-static void nvme_keep_alive_end_io(struct request *rq, blk_status_t status)
+static enum rq_end_io_ret nvme_keep_alive_end_io(struct request *rq,
+                                                blk_status_t status)
 {
        struct nvme_ctrl *ctrl = rq->end_io_data;
        unsigned long flags;
@@ -1184,7 +1185,7 @@ static void nvme_keep_alive_end_io(struct request *rq, blk_status_t status)
                dev_err(ctrl->device,
                        "failed nvme_keep_alive_end_io error=%d\n",
                                status);
-               return;
+               return RQ_END_IO_NONE;
        }
 
        ctrl->comp_seen = false;
@@ -1195,6 +1196,7 @@ static void nvme_keep_alive_end_io(struct request *rq, blk_status_t status)
        spin_unlock_irqrestore(&ctrl->lock, flags);
        if (startka)
                nvme_queue_keep_alive_work(ctrl);
+       return RQ_END_IO_NONE;
 }
 
 static void nvme_keep_alive_work(struct work_struct *work)