public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] dmaengine: idma64: Switch to use __maybe_unused instead of ifdeffery
@ 2020-11-04 10:31 Andy Shevchenko
  2020-11-09 11:52 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2020-11-04 10:31 UTC (permalink / raw)
  To: Vinod Koul, dmaengine, Dan Williams; +Cc: Andy Shevchenko

ifdeffery is prone to errors and makes code harder to read.
Switch to use __maybe_unused instead of ifdeffery.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/idma64.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c
index f5a84c846394..f4c07ad3be15 100644
--- a/drivers/dma/idma64.c
+++ b/drivers/dma/idma64.c
@@ -667,9 +667,7 @@ static int idma64_platform_remove(struct platform_device *pdev)
 	return idma64_remove(chip);
 }
 
-#ifdef CONFIG_PM_SLEEP
-
-static int idma64_pm_suspend(struct device *dev)
+static int __maybe_unused idma64_pm_suspend(struct device *dev)
 {
 	struct idma64_chip *chip = dev_get_drvdata(dev);
 
@@ -677,7 +675,7 @@ static int idma64_pm_suspend(struct device *dev)
 	return 0;
 }
 
-static int idma64_pm_resume(struct device *dev)
+static int __maybe_unused idma64_pm_resume(struct device *dev)
 {
 	struct idma64_chip *chip = dev_get_drvdata(dev);
 
@@ -685,8 +683,6 @@ static int idma64_pm_resume(struct device *dev)
 	return 0;
 }
 
-#endif /* CONFIG_PM_SLEEP */
-
 static const struct dev_pm_ops idma64_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(idma64_pm_suspend, idma64_pm_resume)
 };
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] dmaengine: idma64: Switch to use __maybe_unused instead of ifdeffery
  2020-11-04 10:31 [PATCH v1] dmaengine: idma64: Switch to use __maybe_unused instead of ifdeffery Andy Shevchenko
@ 2020-11-09 11:52 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-11-09 11:52 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: dmaengine, Dan Williams

On 04-11-20, 12:31, Andy Shevchenko wrote:
> ifdeffery is prone to errors and makes code harder to read.
> Switch to use __maybe_unused instead of ifdeffery.


Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-09 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04 10:31 [PATCH v1] dmaengine: idma64: Switch to use __maybe_unused instead of ifdeffery Andy Shevchenko
2020-11-09 11:52 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox