From: YueHaibing <yuehaibing@huawei.com>
To: <ulli.kroll@googlemail.com>, <linus.walleij@linaro.org>,
<clabbe@baylibre.com>, <herbert@gondor.apana.org.au>,
<davem@davemloft.net>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH -next] crypto: sl3516 - Fix build warning without CONFIG_PM
Date: Thu, 17 Jun 2021 11:51:29 +0800 [thread overview]
Message-ID: <20210617035129.4948-1-yuehaibing@huawei.com> (raw)
drivers/crypto/gemini/sl3516-ce-core.c:345:12:
warning: ‘sl3516_ce_pm_resume’ defined but not used [-Wunused-function]
static int sl3516_ce_pm_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~~
Use #ifdef macro to guard this.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/crypto/gemini/sl3516-ce-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/gemini/sl3516-ce-core.c b/drivers/crypto/gemini/sl3516-ce-core.c
index da6cd529a6c0..00bfc5e19818 100644
--- a/drivers/crypto/gemini/sl3516-ce-core.c
+++ b/drivers/crypto/gemini/sl3516-ce-core.c
@@ -320,6 +320,7 @@ static void sl3516_ce_unregister_algs(struct sl3516_ce_dev *ce)
}
}
+#ifdef CONFIG_PM
static void sl3516_ce_start(struct sl3516_ce_dev *ce)
{
ce->ctx = 0;
@@ -365,6 +366,7 @@ static int sl3516_ce_pm_resume(struct device *dev)
sl3516_ce_pm_suspend(dev);
return err;
}
+#endif
static const struct dev_pm_ops sl3516_ce_pm_ops = {
SET_RUNTIME_PM_OPS(sl3516_ce_pm_suspend, sl3516_ce_pm_resume, NULL)
--
2.17.1
next reply other threads:[~2021-06-17 3:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 3:51 YueHaibing [this message]
2021-06-17 13:00 ` [PATCH -next] crypto: sl3516 - Fix build warning without CONFIG_PM LABBE Corentin
2021-06-18 7:57 ` YueHaibing
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=20210617035129.4948-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=clabbe@baylibre.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ulli.kroll@googlemail.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;
as well as URLs for NNTP newsgroup(s).