Skip to content

Commit

Permalink
nvme: fix merge error due to change of 'make_request_fn' fn type
Browse files Browse the repository at this point in the history
The type of 'make_request_fn' changed in 5a7bbad ("block: remove
support for bio remapping from ->make_request"), but the merge of the
nvme driver didn't take that into account, and as a result the driver
would compile with a warning:

  drivers/block/nvme.c: In function 'nvme_alloc_ns':
  drivers/block/nvme.c:1336:2: warning: passing argument 2 of 'blk_queue_make_request' from incompatible pointer type [enabled by default]
  include/linux/blkdev.h:830:13: note: expected 'void (*)(struct request_queue *, struct bio *)' but argument is of type 'int (*)(struct request_queue *, struct bio *)'

It's benign, but the warning is annoying.

Reported-by: Stephen Rothwell <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Jan 18, 2012
1 parent 9ef9b20 commit 93c3d65
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,7 @@ static int nvme_submit_bio_queue(struct nvme_queue *nvmeq, struct nvme_ns *ns,
return result;
}

/*
* NB: return value of non-zero would mean that we were a stacking driver.
* make_request must always succeed.
*/
static int nvme_make_request(struct request_queue *q, struct bio *bio)
static void nvme_make_request(struct request_queue *q, struct bio *bio)
{
struct nvme_ns *ns = q->queuedata;
struct nvme_queue *nvmeq = get_nvmeq(ns->dev);
Expand All @@ -634,8 +630,6 @@ static int nvme_make_request(struct request_queue *q, struct bio *bio)

spin_unlock_irq(&nvmeq->q_lock);
put_nvmeq(nvmeq);

return 0;
}

static irqreturn_t nvme_process_cq(struct nvme_queue *nvmeq)
Expand Down

0 comments on commit 93c3d65

Please sign in to comment.