diff mbox series

[10/14] suspend: add a arch_resume_nosmt() prototype

Message ID 20230517131102.934196-11-arnd@kernel.org (mailing list archive)
State Mainlined, archived
Headers show
Series mm/init/kernel: missing-prototypes warnings | expand

Commit Message

Arnd Bergmann May 17, 2023, 1:10 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

The arch_resume_nosmt() has a __weak definition, plus an x86
specific override, but no prototype that ensures the two have
the same arguments. This causes a W=1 warning:

arch/x86/power/hibernate.c:189:5: error: no previous prototype for 'arch_resume_nosmt' [-Werror=missing-prototypes]

Add the prototype in linux/suspend.h, which is included in
both places.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/suspend.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Rafael J. Wysocki May 17, 2023, 1:48 p.m. UTC | #1
On Wed, May 17, 2023 at 3:12 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The arch_resume_nosmt() has a __weak definition, plus an x86
> specific override, but no prototype that ensures the two have
> the same arguments. This causes a W=1 warning:
>
> arch/x86/power/hibernate.c:189:5: error: no previous prototype for 'arch_resume_nosmt' [-Werror=missing-prototypes]
>
> Add the prototype in linux/suspend.h, which is included in
> both places.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Do you want me to pick this up?

If not

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  include/linux/suspend.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/suspend.h b/include/linux/suspend.h
> index f16653f7be32..bc911fecb8e8 100644
> --- a/include/linux/suspend.h
> +++ b/include/linux/suspend.h
> @@ -472,6 +472,8 @@ static inline int hibernate_quiet_exec(int (*func)(void *data), void *data) {
>  }
>  #endif /* CONFIG_HIBERNATION */
>
> +int arch_resume_nosmt(void);
> +
>  #ifdef CONFIG_HIBERNATION_SNAPSHOT_DEV
>  int is_hibernate_resume_dev(dev_t dev);
>  #else
> --
> 2.39.2
>
Arnd Bergmann May 17, 2023, 2:52 p.m. UTC | #2
On Wed, May 17, 2023, at 15:48, Rafael J. Wysocki wrote:
> On Wed, May 17, 2023 at 3:12 PM Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> The arch_resume_nosmt() has a __weak definition, plus an x86
>> specific override, but no prototype that ensures the two have
>> the same arguments. This causes a W=1 warning:
>>
>> arch/x86/power/hibernate.c:189:5: error: no previous prototype for 'arch_resume_nosmt' [-Werror=missing-prototypes]
>>
>> Add the prototype in linux/suspend.h, which is included in
>> both places.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Do you want me to pick this up?

Yes, please do. Thanks,

     Arnd
Rafael J. Wysocki May 24, 2023, 5:33 p.m. UTC | #3
On Wed, May 17, 2023 at 4:52 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, May 17, 2023, at 15:48, Rafael J. Wysocki wrote:
> > On Wed, May 17, 2023 at 3:12 PM Arnd Bergmann <arnd@kernel.org> wrote:
> >>
> >> From: Arnd Bergmann <arnd@arndb.de>
> >>
> >> The arch_resume_nosmt() has a __weak definition, plus an x86
> >> specific override, but no prototype that ensures the two have
> >> the same arguments. This causes a W=1 warning:
> >>
> >> arch/x86/power/hibernate.c:189:5: error: no previous prototype for 'arch_resume_nosmt' [-Werror=missing-prototypes]
> >>
> >> Add the prototype in linux/suspend.h, which is included in
> >> both places.
> >>
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Do you want me to pick this up?
>
> Yes, please do. Thanks,

Done, thanks!
diff mbox series

Patch

diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index f16653f7be32..bc911fecb8e8 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -472,6 +472,8 @@  static inline int hibernate_quiet_exec(int (*func)(void *data), void *data) {
 }
 #endif /* CONFIG_HIBERNATION */
 
+int arch_resume_nosmt(void);
+
 #ifdef CONFIG_HIBERNATION_SNAPSHOT_DEV
 int is_hibernate_resume_dev(dev_t dev);
 #else