Linux RTC
 help / color / mirror / Atom feed
From: Valentin CARON <valentin.caron@foss.st.com>
To: Arnd Bergmann <arnd@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Antonio Borneo <antonio.borneo@foss.st.com>,
	Amelie Delaunay <amelie.delaunay@foss.st.com>,
	Christophe Guibout <christophe.guibout@foss.st.com>,
	Gabriel Fernandez <gabriel.fernandez@foss.st.com>,
	<linux-rtc@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtc: stm32: remove incorrect #ifdef check
Date: Tue, 1 Aug 2023 15:55:07 +0200	[thread overview]
Message-ID: <a7a373b7-1f3e-3b17-e323-cb636816fb99@foss.st.com> (raw)
In-Reply-To: <20230801105932.3738430-1-arnd@kernel.org>

Hi Arnd,

Thanks for your patch !

On 8/1/23 12:59, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> After a previous commit changed the driver over to
> SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(), the suspend/resume
> functions must no longer be hidden behind an #ifdef:
>
> In file included from include/linux/clk.h:13,
>                   from drivers/rtc/rtc-stm32.c:8:
> drivers/rtc/rtc-stm32.c:927:39: error: 'stm32_rtc_suspend' undeclared here (not in a function); did you mean 'stm32_rtc_probe'?
>    927 |         SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(stm32_rtc_suspend, stm32_rtc_resume)
>        |                                       ^~~~~~~~~~~~~~~~~
> include/linux/kernel.h:58:44: note: in definition of macro 'PTR_IF'
>     58 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
>        |                                            ^~~
> include/linux/pm.h:329:26: note: in expansion of macro 'pm_sleep_ptr'
>    329 |         .suspend_noirq = pm_sleep_ptr(suspend_fn), \
>        |                          ^~~~~~~~~~~~
>
> Fixes: fb9a7e5360dc8 ("rtc: stm32: change PM callbacks to "_noirq()"")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Valentin Caron <valentin.caron@foss.st.com>
> ---
>   drivers/rtc/rtc-stm32.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c
> index 85689192fa7ae..c296e7af0700c 100644
> --- a/drivers/rtc/rtc-stm32.c
> +++ b/drivers/rtc/rtc-stm32.c
> @@ -890,7 +890,6 @@ static void stm32_rtc_remove(struct platform_device *pdev)
>   	device_init_wakeup(&pdev->dev, false);
>   }
>   
> -#ifdef CONFIG_PM_SLEEP
>   static int stm32_rtc_suspend(struct device *dev)
>   {
>   	struct stm32_rtc *rtc = dev_get_drvdata(dev);
> @@ -921,7 +920,6 @@ static int stm32_rtc_resume(struct device *dev)
>   
>   	return ret;
>   }
> -#endif
>   
>   static const struct dev_pm_ops stm32_rtc_pm_ops = {
>   	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(stm32_rtc_suspend, stm32_rtc_resume)

  reply	other threads:[~2023-08-01 13:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 10:59 [PATCH] rtc: stm32: remove incorrect #ifdef check Arnd Bergmann
2023-08-01 13:55 ` Valentin CARON [this message]
2023-08-09 16:36 ` kernel test robot
2023-08-09 18:24   ` Arnd Bergmann
2023-08-16 11:35     ` Geert Uytterhoeven
2023-08-10  7:22 ` Alexandre Belloni

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=a7a373b7-1f3e-3b17-e323-cb636816fb99@foss.st.com \
    --to=valentin.caron@foss.st.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=antonio.borneo@foss.st.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=christophe.guibout@foss.st.com \
    --cc=gabriel.fernandez@foss.st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    /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