From: Jon Hunter <jonathanh@nvidia.com>
To: YueHaibing <yuehaibing@huawei.com>, <ldewangan@nvidia.com>,
<vkoul@kernel.org>, <dan.j.williams@intel.com>,
<thierry.reding@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <dmaengine@vger.kernel.org>,
<linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: tegra210-adma: Fix unused function warnings
Date: Wed, 10 Jul 2019 09:38:37 +0100 [thread overview]
Message-ID: <5cda4486-d875-4f66-c7f9-0ed11e35d44c@nvidia.com> (raw)
In-Reply-To: <20190709083258.57112-1-yuehaibing@huawei.com>
On 09/07/2019 09:32, YueHaibing wrote:
> If CONFIG_PM is not set, build warnings:
>
> drivers/dma/tegra210-adma.c:747:12: warning: tegra_adma_runtime_resume defined but not used [-Wunused-function]
> static int tegra_adma_runtime_resume(struct device *dev)
> drivers/dma/tegra210-adma.c:715:12: warning: tegra_adma_runtime_suspend defined but not used [-Wunused-function]
> static int tegra_adma_runtime_suspend(struct device *dev)
>
> Mark the two function as __maybe_unused.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/dma/tegra210-adma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
> index 2805853..b33cf6e 100644
> --- a/drivers/dma/tegra210-adma.c
> +++ b/drivers/dma/tegra210-adma.c
> @@ -712,7 +712,7 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec,
> return chan;
> }
>
> -static int tegra_adma_runtime_suspend(struct device *dev)
> +static int __maybe_unused tegra_adma_runtime_suspend(struct device *dev)
> {
> struct tegra_adma *tdma = dev_get_drvdata(dev);
> struct tegra_adma_chan_regs *ch_reg;
> @@ -744,7 +744,7 @@ static int tegra_adma_runtime_suspend(struct device *dev)
> return 0;
> }
>
> -static int tegra_adma_runtime_resume(struct device *dev)
> +static int __maybe_unused tegra_adma_runtime_resume(struct device *dev)
> {
> struct tegra_adma *tdma = dev_get_drvdata(dev);
> struct tegra_adma_chan_regs *ch_reg;
>
Thanks!
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Cheers
Jon
--
nvpublic
next prev parent reply other threads:[~2019-07-10 8:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 8:32 [PATCH] dmaengine: tegra210-adma: Fix unused function warnings YueHaibing
2019-07-10 8:38 ` Jon Hunter [this message]
2019-07-25 13:02 ` 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=5cda4486-d875-4f66-c7f9-0ed11e35d44c@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=vkoul@kernel.org \
--cc=yuehaibing@huawei.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).