mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rix <trix@redhat.com>
To: peter.ujfalusi@gmail.com, vkoul@kernel.org
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tom Rix <trix@redhat.com>
Subject: [PATCH] dmaengine: ti: k3-udma: define udma_pm_resume,suspend with CONFIG_PM_SLEEP
Date: Sun, 30 Apr 2023 22:56:47 -0400	[thread overview]
Message-ID: <20230501025647.2905317-1-trix@redhat.com> (raw)

gcc reports
drivers/dma/ti/k3-udma.c:5552:12: error: ‘udma_pm_resume’
  defined but not used [-Werror=unused-function]
 5552 | static int udma_pm_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~
drivers/dma/ti/k3-udma.c:5530:12: error: ‘udma_pm_suspend’
  defined but not used [-Werror=unused-function]
 5530 | static int udma_pm_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~

These functions are used conditionally with CONFIG_PM_SLEEP,
so they should be likewise defined.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/dma/ti/k3-udma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index fc3a2a05ab7b..f189b0f2e423 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -5527,6 +5527,7 @@ static int udma_probe(struct platform_device *pdev)
 	return ret;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int udma_pm_suspend(struct device *dev)
 {
 	struct udma_dev *ud = dev_get_drvdata(dev);
@@ -5573,6 +5574,7 @@ static int udma_pm_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static const struct dev_pm_ops udma_pm_ops = {
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(udma_pm_suspend, udma_pm_resume)
-- 
2.27.0


             reply	other threads:[~2023-05-01  2:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01  2:56 Tom Rix [this message]
2023-05-16 17:44 ` 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=20230501025647.2905317-1-trix@redhat.com \
    --to=trix@redhat.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.ujfalusi@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®