2022-08-22 04:57:51

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the block tree

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 <[email protected]>
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 <[email protected]>
---
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


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-08-22 14:42:26

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

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.

--
Jens Axboe

2022-08-22 16:05:41

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On 8/22/22 9:34 AM, Bart Van Assche wrote:
> 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:

Done - please check the end result, both yours and Stephen's had to be
manually applied.

--
Jens Axboe

2022-08-22 16:15:50

by Bart Van Assche

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

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.

2022-08-22 16:21:16

by Bart Van Assche

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On 8/22/22 08:40, Jens Axboe wrote:
> Done - please check the end result, both yours and Stephen's had to be
> manually applied.

Hi Jens,

There is a difference between the qlogicpti source code in your tree and in
the master branch. Is this change intentional?

Thanks,

Bart.

$ PAGER= git diff origin/master..axboe-block/for-next drivers/scsi/qlogicpti*
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 57f2f4135a06..87b60bf9ad3b 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1339,7 +1339,7 @@ static int qpti_sbus_probe(struct platform_device *op)
/* Clear out scsi_cmnd array. */
memset(qpti->cmd_slots, 0, sizeof(qpti->cmd_slots));

- if (qpti_map_queues(qpti) < 0)
+ if (qpti_map_queues(qpti))
goto fail_free_irq;

/* Load the firmware. */

2022-08-22 16:47:12

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On 8/22/22 10:06 AM, Bart Van Assche wrote:
> On 8/22/22 08:40, Jens Axboe wrote:
>> Done - please check the end result, both yours and Stephen's had to be
>> manually applied.
>
> Hi Jens,
>
> There is a difference between the qlogicpti source code in your tree and in
> the master branch. Is this change intentional?

I did notice that, we can just make them identical. Won't really matter,
but might as well keep them consistent.

--
Jens Axboe