2022-01-04 00:15:56

by Stephen Rothwell

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

Hi all,

After merging the pm tree, today's linux-next build (x86_84 allmodconfig)
failed like this:

sound/soc/sh/rz-ssi.c: In function 'rz_ssi_probe':
sound/soc/sh/rz-ssi.c:1023:2: error: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Werror=unused-result]
1023 | pm_runtime_resume_and_get(&pdev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

877d952c261e ("PM: runtime: Annotate pm_runtime_resume_and_get() as __must_check")

This also produced the following warnings in my arm multi_v7_defconfig
build:

drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_hw_init':
drivers/crypto/stm32/stm32-hash.c:816:2: warning: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Wunused-result]
816 | pm_runtime_resume_and_get(hdev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_import':
drivers/crypto/stm32/stm32-hash.c:1003:2: warning: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Wunused-result]
1003 | pm_runtime_resume_and_get(hdev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_export':
drivers/crypto/stm32/stm32-hash.c:965:2: warning: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Wunused-result]
965 | pm_runtime_resume_and_get(hdev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/crypto/stm32/stm32-cryp.c: In function 'stm32_cryp_hw_init':
drivers/crypto/stm32/stm32-cryp.c:545:2: warning: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Wunused-result]
545 | pm_runtime_resume_and_get(cryp->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have used the pm tree from next-20211224 for today.

--
Cheers,
Stephen Rothwell


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

2022-01-04 07:30:41

by Heiner Kallweit

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

On 04.01.2022 01:15, Stephen Rothwell wrote:
> Hi all,
>
> After merging the pm tree, today's linux-next build (x86_84 allmodconfig)
> failed like this:
>
> sound/soc/sh/rz-ssi.c: In function 'rz_ssi_probe':
> sound/soc/sh/rz-ssi.c:1023:2: error: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Werror=unused-result]
> 1023 | pm_runtime_resume_and_get(&pdev->dev);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> 877d952c261e ("PM: runtime: Annotate pm_runtime_resume_and_get() as __must_check")
>
> This also produced the following warnings in my arm multi_v7_defconfig
> build:
>
> drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_hw_init':
> drivers/crypto/stm32/stm32-hash.c:816:2: warning: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Wunused-result]
> 816 | pm_runtime_resume_and_get(hdev->dev);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_import':
> drivers/crypto/stm32/stm32-hash.c:1003:2: warning: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Wunused-result]
> 1003 | pm_runtime_resume_and_get(hdev->dev);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_export':
> drivers/crypto/stm32/stm32-hash.c:965:2: warning: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Wunused-result]
> 965 | pm_runtime_resume_and_get(hdev->dev);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/crypto/stm32/stm32-cryp.c: In function 'stm32_cryp_hw_init':
> drivers/crypto/stm32/stm32-cryp.c:545:2: warning: ignoring return value of 'pm_runtime_resume_and_get' declared with attribute 'warn_unused_result' [-Wunused-result]
> 545 | pm_runtime_resume_and_get(cryp->dev);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> I have used the pm tree from next-20211224 for today.
>
The patch in the pm tree annotating pm_runtime_resume_and_get() as __must_check
follows some fixes of pm_runtime_resume_and_get() usage that went through other
trees. These fixes are in linux-next but don't seem to be in the pm tree.
We talk about:
f04b4fb47d83 ("ASoC: sh: rz-ssi: Check return value of pm_runtime_resume_and_get()")
3d6b661330a7 ("crypto: stm32 - Revert broken pm_runtime_resume_and_get changes")

2022-01-04 08:02:57

by Stephen Rothwell

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

Hi Heiner,

On Tue, 4 Jan 2022 08:29:28 +0100 Heiner Kallweit <[email protected]> wrote:
>
> The patch in the pm tree annotating pm_runtime_resume_and_get() as __must_check
> follows some fixes of pm_runtime_resume_and_get() usage that went through other
> trees. These fixes are in linux-next but don't seem to be in the pm tree.
> We talk about:
> f04b4fb47d83 ("ASoC: sh: rz-ssi: Check return value of pm_runtime_resume_and_get()")

In the sound-asoc tree.

> 3d6b661330a7 ("crypto: stm32 - Revert broken pm_runtime_resume_and_get changes")

In the crypto tree.

Both those are merged into linux-next after the pm tree. If Linus did
the same, the pm tree commit would break his build. The only way you
can have that pm tree commit in linux-next is to ask Andrew Morton to
put it in the post linux-next part of his patch series. Otherwise, it
needs to be removed form the pm tree and wait until after the next
merge window closes (or at least both the above trees have been merged
by Linus).

--
Cheers,
Stephen Rothwell


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

2022-01-04 14:43:37

by Heiner Kallweit

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

On 04.01.2022 09:02, Stephen Rothwell wrote:
> Hi Heiner,
>
> On Tue, 4 Jan 2022 08:29:28 +0100 Heiner Kallweit <[email protected]> wrote:
>>
>> The patch in the pm tree annotating pm_runtime_resume_and_get() as __must_check
>> follows some fixes of pm_runtime_resume_and_get() usage that went through other
>> trees. These fixes are in linux-next but don't seem to be in the pm tree.
>> We talk about:
>> f04b4fb47d83 ("ASoC: sh: rz-ssi: Check return value of pm_runtime_resume_and_get()")
>
> In the sound-asoc tree.
>
>> 3d6b661330a7 ("crypto: stm32 - Revert broken pm_runtime_resume_and_get changes")
>
> In the crypto tree.
>
> Both those are merged into linux-next after the pm tree. If Linus did
> the same, the pm tree commit would break his build. The only way you
> can have that pm tree commit in linux-next is to ask Andrew Morton to
> put it in the post linux-next part of his patch series. Otherwise, it
> needs to be removed form the pm tree and wait until after the next
> merge window closes (or at least both the above trees have been merged
> by Linus).
>
Rafael,
can you take care of this?
To avoid such issues I think next time I'd route all dependent patches
through one tree and just get the ACK from the other involved maintainers.

Thank you, Heiner

2022-01-04 14:57:26

by Rafael J. Wysocki

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

On Tue, Jan 4, 2022 at 3:43 PM Heiner Kallweit <[email protected]> wrote:
>
> On 04.01.2022 09:02, Stephen Rothwell wrote:
> > Hi Heiner,
> >
> > On Tue, 4 Jan 2022 08:29:28 +0100 Heiner Kallweit <[email protected]> wrote:
> >>
> >> The patch in the pm tree annotating pm_runtime_resume_and_get() as __must_check
> >> follows some fixes of pm_runtime_resume_and_get() usage that went through other
> >> trees. These fixes are in linux-next but don't seem to be in the pm tree.
> >> We talk about:
> >> f04b4fb47d83 ("ASoC: sh: rz-ssi: Check return value of pm_runtime_resume_and_get()")
> >
> > In the sound-asoc tree.
> >
> >> 3d6b661330a7 ("crypto: stm32 - Revert broken pm_runtime_resume_and_get changes")
> >
> > In the crypto tree.
> >
> > Both those are merged into linux-next after the pm tree. If Linus did
> > the same, the pm tree commit would break his build. The only way you
> > can have that pm tree commit in linux-next is to ask Andrew Morton to
> > put it in the post linux-next part of his patch series. Otherwise, it
> > needs to be removed form the pm tree and wait until after the next
> > merge window closes (or at least both the above trees have been merged
> > by Linus).
> >
> Rafael,
> can you take care of this?

Done.

I've dropped the commit in question from pm-core and I'm going to add
it back and submit by the end of the merge window.