From: <Tudor.Ambarus@microchip.com>
To: <Claudiu.Beznea@microchip.com>, <Ludovic.Desroches@microchip.com>,
<vkoul@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] dmaengine: at_xdmac: use __maybe_unused for pm functions
Date: Fri, 15 Oct 2021 08:01:16 +0000 [thread overview]
Message-ID: <2f897cb2-a498-c386-2d5b-26a304f20d1f@microchip.com> (raw)
In-Reply-To: <20211007111230.2331837-4-claudiu.beznea@microchip.com>
On 10/7/21 2:12 PM, Claudiu Beznea wrote:
> Use __maybe_unused for pm functions.
Explaining why would be nice. E.g. avoiding ifdefs throughout the code,
and stop defining atmel_xdmac_prepare as NULL.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> drivers/dma/at_xdmac.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index e18abbd56fb5..12371396fcc0 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -1950,8 +1950,7 @@ static void at_xdmac_axi_config(struct platform_device *pdev)
> }
> }
>
> -#ifdef CONFIG_PM
> -static int atmel_xdmac_prepare(struct device *dev)
> +static int __maybe_unused atmel_xdmac_prepare(struct device *dev)
> {
> struct at_xdmac *atxdmac = dev_get_drvdata(dev);
> struct dma_chan *chan, *_chan;
> @@ -1965,12 +1964,8 @@ static int atmel_xdmac_prepare(struct device *dev)
> }
> return 0;
> }
> -#else
> -# define atmel_xdmac_prepare NULL
> -#endif
>
> -#ifdef CONFIG_PM_SLEEP
> -static int atmel_xdmac_suspend(struct device *dev)
> +static int __maybe_unused atmel_xdmac_suspend(struct device *dev)
> {
> struct at_xdmac *atxdmac = dev_get_drvdata(dev);
> struct dma_chan *chan, *_chan;
> @@ -1994,7 +1989,7 @@ static int atmel_xdmac_suspend(struct device *dev)
> return 0;
> }
>
> -static int atmel_xdmac_resume(struct device *dev)
> +static int __maybe_unused atmel_xdmac_resume(struct device *dev)
> {
> struct at_xdmac *atxdmac = dev_get_drvdata(dev);
> struct at_xdmac_chan *atchan;
> @@ -2032,7 +2027,6 @@ static int atmel_xdmac_resume(struct device *dev)
> }
> return 0;
> }
> -#endif /* CONFIG_PM_SLEEP */
>
> static int at_xdmac_probe(struct platform_device *pdev)
> {
>
WARNING: multiple messages have this Message-ID (diff)
From: <Tudor.Ambarus@microchip.com>
To: <Claudiu.Beznea@microchip.com>, <Ludovic.Desroches@microchip.com>,
<vkoul@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] dmaengine: at_xdmac: use __maybe_unused for pm functions
Date: Fri, 15 Oct 2021 08:01:16 +0000 [thread overview]
Message-ID: <2f897cb2-a498-c386-2d5b-26a304f20d1f@microchip.com> (raw)
In-Reply-To: <20211007111230.2331837-4-claudiu.beznea@microchip.com>
On 10/7/21 2:12 PM, Claudiu Beznea wrote:
> Use __maybe_unused for pm functions.
Explaining why would be nice. E.g. avoiding ifdefs throughout the code,
and stop defining atmel_xdmac_prepare as NULL.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> drivers/dma/at_xdmac.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index e18abbd56fb5..12371396fcc0 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -1950,8 +1950,7 @@ static void at_xdmac_axi_config(struct platform_device *pdev)
> }
> }
>
> -#ifdef CONFIG_PM
> -static int atmel_xdmac_prepare(struct device *dev)
> +static int __maybe_unused atmel_xdmac_prepare(struct device *dev)
> {
> struct at_xdmac *atxdmac = dev_get_drvdata(dev);
> struct dma_chan *chan, *_chan;
> @@ -1965,12 +1964,8 @@ static int atmel_xdmac_prepare(struct device *dev)
> }
> return 0;
> }
> -#else
> -# define atmel_xdmac_prepare NULL
> -#endif
>
> -#ifdef CONFIG_PM_SLEEP
> -static int atmel_xdmac_suspend(struct device *dev)
> +static int __maybe_unused atmel_xdmac_suspend(struct device *dev)
> {
> struct at_xdmac *atxdmac = dev_get_drvdata(dev);
> struct dma_chan *chan, *_chan;
> @@ -1994,7 +1989,7 @@ static int atmel_xdmac_suspend(struct device *dev)
> return 0;
> }
>
> -static int atmel_xdmac_resume(struct device *dev)
> +static int __maybe_unused atmel_xdmac_resume(struct device *dev)
> {
> struct at_xdmac *atxdmac = dev_get_drvdata(dev);
> struct at_xdmac_chan *atchan;
> @@ -2032,7 +2027,6 @@ static int atmel_xdmac_resume(struct device *dev)
> }
> return 0;
> }
> -#endif /* CONFIG_PM_SLEEP */
>
> static int at_xdmac_probe(struct platform_device *pdev)
> {
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-10-15 8:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 11:12 [PATCH 0/4] dmaengine: at_xdmac: fixes and code enhancements Claudiu Beznea
2021-10-07 11:12 ` Claudiu Beznea
2021-10-07 11:12 ` [PATCH 1/4] dmaengine: at_xdmac: call at_xdmac_axi_config() on resume path Claudiu Beznea
2021-10-07 11:12 ` Claudiu Beznea
2021-10-15 7:49 ` Tudor.Ambarus
2021-10-15 7:49 ` Tudor.Ambarus
2021-10-07 11:12 ` [PATCH 2/4] dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro Claudiu Beznea
2021-10-07 11:12 ` Claudiu Beznea
2021-10-15 7:50 ` Tudor.Ambarus
2021-10-15 7:50 ` Tudor.Ambarus
2021-10-07 11:12 ` [PATCH 3/4] dmaengine: at_xdmac: use __maybe_unused for pm functions Claudiu Beznea
2021-10-07 11:12 ` Claudiu Beznea
2021-10-15 8:01 ` Tudor.Ambarus [this message]
2021-10-15 8:01 ` Tudor.Ambarus
2021-10-07 11:12 ` [PATCH 4/4] dmaengine: at_xdmac: use pm_ptr() Claudiu Beznea
2021-10-07 11:12 ` Claudiu Beznea
2021-10-15 8:03 ` Tudor.Ambarus
2021-10-15 8:03 ` Tudor.Ambarus
2021-10-18 6:12 ` [PATCH 0/4] dmaengine: at_xdmac: fixes and code enhancements Vinod Koul
2021-10-18 6:12 ` Vinod Koul
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=2f897cb2-a498-c386-2d5b-26a304f20d1f@microchip.com \
--to=tudor.ambarus@microchip.com \
--cc=Claudiu.Beznea@microchip.com \
--cc=Ludovic.Desroches@microchip.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.