From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Mathieu Malaterre <malat@debian.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: Len Brown <len.brown@intel.com>,
linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
Pavel Machek <pavel@ucw.cz>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/power: Expose pfn_is_nosave prototype
Date: Thu, 23 May 2019 14:02:05 +0200 [thread overview]
Message-ID: <11ffdbd5-60a9-b1fa-aa83-9d3c60e3d462@c-s.fr> (raw)
In-Reply-To: <20190523114736.30268-1-malat@debian.org>
Le 23/05/2019 à 13:47, Mathieu Malaterre a écrit :
> The declaration for pfn_is_nosave is only available in
> kernel/power/power.h. Since this function can be override in arch,
> expose it globally. Having a prototype will make sure to avoid warning
> (sometime treated as error with W=1) such as:
>
> arch/powerpc/kernel/suspend.c:18:5: error: no previous prototype for 'pfn_is_nosave' [-Werror=missing-prototypes]
>
> This moves the declaration into a globally visible header file and add
> missing include to avoid a warning in powerpc.
Then you should also drop it from kernel/power/power.h and
arch/s390/kernel/entry.h
Christophe
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
> arch/powerpc/kernel/suspend.c | 1 +
> include/linux/suspend.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/powerpc/kernel/suspend.c b/arch/powerpc/kernel/suspend.c
> index a531154cc0f3..9e1b6b894245 100644
> --- a/arch/powerpc/kernel/suspend.c
> +++ b/arch/powerpc/kernel/suspend.c
> @@ -8,6 +8,7 @@
> */
>
> #include <linux/mm.h>
> +#include <linux/suspend.h>
> #include <asm/page.h>
> #include <asm/sections.h>
>
> diff --git a/include/linux/suspend.h b/include/linux/suspend.h
> index 3f529ad9a9d2..2660bbdf5230 100644
> --- a/include/linux/suspend.h
> +++ b/include/linux/suspend.h
> @@ -395,6 +395,7 @@ extern bool system_entering_hibernation(void);
> extern bool hibernation_available(void);
> asmlinkage int swsusp_save(void);
> extern struct pbe *restore_pblist;
> +int pfn_is_nosave(unsigned long pfn);
> #else /* CONFIG_HIBERNATION */
> static inline void register_nosave_region(unsigned long b, unsigned long e) {}
> static inline void register_nosave_region_late(unsigned long b, unsigned long e) {}
>
next prev parent reply other threads:[~2019-05-23 12:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 11:47 [PATCH] powerpc/power: Expose pfn_is_nosave prototype Mathieu Malaterre
2019-05-23 12:02 ` Christophe Leroy [this message]
2019-05-24 10:44 ` [PATCH v2] " Mathieu Malaterre
2019-05-27 10:53 ` Rafael J. Wysocki
2019-05-28 1:16 ` Michael Ellerman
2019-05-28 15:48 ` Rafael J. Wysocki
2019-05-28 1:15 ` Michael Ellerman
2019-06-27 22:00 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11ffdbd5-60a9-b1fa-aa83-9d3c60e3d462@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malat@debian.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).