On 8/22/22 06:55, Jens Axboe wrote:
On 8/21/22 4:46 AM, Stephen Rothwell wrote:
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.
Folded in, thanks Stephen.
Hi Jens,
Please drop Stephen's patch and fold in this patch instead:
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index a5aa716e9086..57f2f4135a06 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -814,7 +814,7 @@ static void qpti_get_clock(struct qlogicpti *qpti)
/* The request and response queues must each be aligned
* on a page boundary.
*/
-static void qpti_map_queues(struct qlogicpti *qpti)
+static int qpti_map_queues(struct qlogicpti *qpti)
{
struct platform_device *op = qpti->op;
@@ -840,6 +840,7 @@ static void qpti_map_queues(struct qlogicpti *qpti)
}
memset(qpti->res_cpu, 0, QSIZE(RES_QUEUE_LEN));
memset(qpti->req_cpu, 0, QSIZE(QLOGICPTI_REQ_QUEUE_LEN));
+ return 0;
}
const char *qlogicpti_info(struct Scsi_Host *host)
@@ -1338,7 +1339,8 @@ static int qpti_sbus_probe(struct platform_device *op)
/* Clear out scsi_cmnd array. */
memset(qpti->cmd_slots, 0, sizeof(qpti->cmd_slots));
- qpti_map_queues(qpti);
+ if (qpti_map_queues(qpti) < 0)
+ goto fail_free_irq;
/* Load the firmware. */
if (qlogicpti_load_firmware(qpti))
Thanks,
Bart.