mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stanimir Varbanov <svarbanov@mm-sol.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Hans Verkuil <hansverk@cisco.com>,
	Colin Ian King <colin.king@canonical.com>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] [media] venus: mark PM functions as __maybe_unused
Date: Tue, 27 Jun 2017 22:41:52 +0300	[thread overview]
Message-ID: <f41a39c6-71e7-2ebf-62e2-6b094e53053d@mm-sol.com> (raw)
In-Reply-To: <20170627150310.719212-1-arnd@arndb.de>

Hi Arnd,

Thanks for the catch!

On 27.06.2017 18:02, Arnd Bergmann wrote:
> Without PM support, gcc warns about two unused functions:
> 
> platform/qcom/venus/core.c:146:13: error: 'venus_clks_disable' defined but not used [-Werror=unused-function]
> platform/qcom/venus/core.c:126:12: error: 'venus_clks_enable' defined but not used [-Werror=unused-function]
> 
> The problem as usual are incorrect #ifdefs, so the easiest fix
> is to do away with the #ifdef completely and mark the suspend/resume
> handlers as __maybe_unused, which they are.
> 
> Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

> ---
>   drivers/media/platform/qcom/venus/core.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index d8cbe8549d97..47f79637938c 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -270,8 +270,7 @@ static int venus_remove(struct platform_device *pdev)
>   	return ret;
>   }
>   
> -#ifdef CONFIG_PM
> -static int venus_runtime_suspend(struct device *dev)
> +static __maybe_unused int venus_runtime_suspend(struct device *dev)
>   {
>   	struct venus_core *core = dev_get_drvdata(dev);
>   	int ret;
> @@ -283,7 +282,7 @@ static int venus_runtime_suspend(struct device *dev)
>   	return ret;
>   }
>   
> -static int venus_runtime_resume(struct device *dev)
> +static __maybe_unused int venus_runtime_resume(struct device *dev)
>   {
>   	struct venus_core *core = dev_get_drvdata(dev);
>   	int ret;
> @@ -302,7 +301,6 @@ static int venus_runtime_resume(struct device *dev)
>   	venus_clks_disable(core);
>   	return ret;
>   }
> -#endif
>   
>   static const struct dev_pm_ops venus_pm_ops = {
>   	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> 

      parent reply	other threads:[~2017-06-27 19:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 15:02 Arnd Bergmann
2017-06-27 15:02 ` [PATCH 2/3] [media] venus: don't abuse dma_alloc for non-DMA allocations Arnd Bergmann
2017-06-27 19:39   ` Stanimir Varbanov
2017-06-27 20:15     ` Arnd Bergmann
2017-06-27 15:02 ` [PATCH 3/3] [media] venus: fix compile-test build on non-qcom ARM platform Arnd Bergmann
2017-06-27 19:45   ` Stanimir Varbanov
2017-06-28 20:25     ` Arnd Bergmann
2017-06-27 19:41 ` Stanimir Varbanov [this message]

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=f41a39c6-71e7-2ebf-62e2-6b094e53053d@mm-sol.com \
    --to=svarbanov@mm-sol.com \
    --cc=arnd@arndb.de \
    --cc=colin.king@canonical.com \
    --cc=hansverk@cisco.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stanimir.varbanov@linaro.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®