Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvme: fix merge error due to change of 'make_request_fn' fn type

The type of 'make_request_fn' changed in 5a7bbad27a4 ("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 <sfr@canb.auug.org>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+1 -7
+1 -7
drivers/block/nvme.c
··· 613 613 return result; 614 614 } 615 615 616 - /* 617 - * NB: return value of non-zero would mean that we were a stacking driver. 618 - * make_request must always succeed. 619 - */ 620 - static int nvme_make_request(struct request_queue *q, struct bio *bio) 616 + static void nvme_make_request(struct request_queue *q, struct bio *bio) 621 617 { 622 618 struct nvme_ns *ns = q->queuedata; 623 619 struct nvme_queue *nvmeq = get_nvmeq(ns->dev); ··· 630 634 631 635 spin_unlock_irq(&nvmeq->q_lock); 632 636 put_nvmeq(nvmeq); 633 - 634 - return 0; 635 637 } 636 638 637 639 static irqreturn_t nvme_process_cq(struct nvme_queue *nvmeq)