linux-next: build failure after merge of the block tree

From: Stephen Rothwell
Date: Mon Aug 22 2022 - 00:46:26 EST


Hi all,

After merging the block tree, today's linux-next build (sparc defconfig)
failed like this:

drivers/scsi/qlogicpti.c: In function 'qpti_map_queues':
drivers/scsi/qlogicpti.c:828:24: error: 'return' with a value, in function returning void [-Werror=return-type]
828 | return -1;
| ^
drivers/scsi/qlogicpti.c:817:13: note: declared here
817 | static void qpti_map_queues(struct qlogicpti *qpti)
| ^~~~~~~~~~~~~~~
drivers/scsi/qlogicpti.c:839:24: error: 'return' with a value, in function returning void [-Werror=return-type]
839 | return -1;
| ^
drivers/scsi/qlogicpti.c:817:13: note: declared here
817 | static void qpti_map_queues(struct qlogicpti *qpti)
| ^~~~~~~~~~~~~~~
drivers/scsi/qlogicpti.c: In function 'qpti_sbus_probe':
drivers/scsi/qlogicpti.c:1394:1: warning: label 'fail_free_irq' defined but not used [-Wunused-label]
1394 | fail_free_irq:
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors

Caused by commit

f19f2c966b2f ("block: Change the return type of blk_mq_map_queues() into void")

I have applied the following fix up patch for today.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Mon, 22 Aug 2022 14:40:02 +1000
Subject: [PATCH] fix up for "block: Change the return type of blk_mq_map_queues() into void"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
drivers/scsi/qlogicpti.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index a5aa716e9086..5bddfe0233b2 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -825,7 +825,7 @@ static void qpti_map_queues(struct qlogicpti *qpti)
if (qpti->res_cpu == NULL ||
qpti->res_dvma == 0) {
printk("QPTI: Cannot map response queue.\n");
- return -1;
+ return;
}

qpti->req_cpu = dma_alloc_coherent(&op->dev,
@@ -836,7 +836,7 @@ static void qpti_map_queues(struct qlogicpti *qpti)
dma_free_coherent(&op->dev, QSIZE(RES_QUEUE_LEN),
qpti->res_cpu, qpti->res_dvma);
printk("QPTI: Cannot map request queue.\n");
- return -1;
+ return;
}
memset(qpti->res_cpu, 0, QSIZE(RES_QUEUE_LEN));
memset(qpti->req_cpu, 0, QSIZE(QLOGICPTI_REQ_QUEUE_LEN));
@@ -1391,7 +1391,6 @@ static int qpti_sbus_probe(struct platform_device *op)
qpti->req_cpu, qpti->req_dvma);
#undef QSIZE

-fail_free_irq:
free_irq(qpti->irq, qpti);

fail_unmap_regs:
--
2.35.1

--
Cheers,
Stephen Rothwell

Attachment: pgpG2um9bAafi.pgp
Description: OpenPGP digital signature