Skip to content

Commit

Permalink
NVMe: Rename cancel_cmdid_data to cancel_cmdid
Browse files Browse the repository at this point in the history
The trailing '_data' on the end was annoying and inconsistent.  Also, make
it actually return the data since this is needed for timing out commands.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent 09a58f5 commit 21075bd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,13 @@ static unsigned long free_cmdid(struct nvme_queue *nvmeq, int cmdid)
return data;
}

static void cancel_cmdid_data(struct nvme_queue *nvmeq, int cmdid)
static unsigned long cancel_cmdid(struct nvme_queue *nvmeq, int cmdid)
{
unsigned long data;
struct nvme_cmd_info *info = nvme_cmd_info(nvmeq);
data = info[cmdid].ctx;
info[cmdid].ctx = CMD_CTX_CANCELLED;
return data;
}

static struct nvme_queue *get_nvmeq(struct nvme_ns *ns)
Expand Down Expand Up @@ -667,7 +670,7 @@ static irqreturn_t nvme_irq_check(int irq, void *data)
static void nvme_abort_command(struct nvme_queue *nvmeq, int cmdid)
{
spin_lock_irq(&nvmeq->q_lock);
cancel_cmdid_data(nvmeq, cmdid);
cancel_cmdid(nvmeq, cmdid);
spin_unlock_irq(&nvmeq->q_lock);
}

Expand Down

0 comments on commit 21075bd

Please sign in to comment.