mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lubomir Rintel <lkundrak@v3.sk>
To: YueHaibing <yuehaibing@huawei.com>
Cc: corbet@lwn.net, mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] media: marvell-ccic: Fix -Wunused-function warnings
Date: Thu, 10 Sep 2020 10:22:21 +0200	[thread overview]
Message-ID: <20200910082221.GA1115782@demiurge.local> (raw)
In-Reply-To: <20200910080933.40684-1-yuehaibing@huawei.com>

On Thu, Sep 10, 2020 at 04:09:33PM +0800, YueHaibing wrote:
> If CONFIG_PM is n, gcc warns:
> 
> drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning: ‘mmpcam_resume’ defined but not used [-Wunused-function]
>  static int mmpcam_resume(struct device *dev)
>             ^~~~~~~~~~~~~
> drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning: ‘mmpcam_suspend’ defined but not used [-Wunused-function]
>  static int mmpcam_suspend(struct device *dev)
>             ^~~~~~~~~~~~~~
> drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function]
>  static int mmpcam_runtime_suspend(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~~
> drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function]
>  static int mmpcam_runtime_resume(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~
> 
> Mark them as __maybe_unused to fix this.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Your colleague seems to sent out an equivalent patch:
https://lore.kernel.org/lkml/20200910080933.40684-1-yuehaibing@huawei.com/

Cheers
Lubo

> ---
>  drivers/media/platform/marvell-ccic/mmp-driver.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
> index c4b28a00a3a2..032fdddbbecc 100644
> --- a/drivers/media/platform/marvell-ccic/mmp-driver.c
> +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
> @@ -307,7 +307,7 @@ static int mmpcam_platform_remove(struct platform_device *pdev)
>   * Suspend/resume support.
>   */
>  
> -static int mmpcam_runtime_resume(struct device *dev)
> +static int __maybe_unused mmpcam_runtime_resume(struct device *dev)
>  {
>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>  	struct mcam_camera *mcam = &cam->mcam;
> @@ -321,7 +321,7 @@ static int mmpcam_runtime_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static int mmpcam_runtime_suspend(struct device *dev)
> +static int __maybe_unused mmpcam_runtime_suspend(struct device *dev)
>  {
>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>  	struct mcam_camera *mcam = &cam->mcam;
> @@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int mmpcam_suspend(struct device *dev)
> +static int __maybe_unused mmpcam_suspend(struct device *dev)
>  {
>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>  
> @@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int mmpcam_resume(struct device *dev)
> +static int __maybe_unused mmpcam_resume(struct device *dev)
>  {
>  	struct mmp_camera *cam = dev_get_drvdata(dev);
>  
> -- 
> 2.17.1
> 
> 

  reply	other threads:[~2020-09-10  8:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  8:09 YueHaibing
2020-09-10  8:22 ` Lubomir Rintel [this message]
2020-09-10  9:18   ` Yuehaibing
2020-09-10 14:57     ` Lubomir Rintel
2020-09-11  4:53       ` Yuehaibing
2020-09-11 11:27 ` [PATCH v2 " YueHaibing
2020-10-14 13:50   ` Geert Uytterhoeven

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=20200910082221.GA1115782@demiurge.local \
    --to=lkundrak@v3.sk \
    --cc=corbet@lwn.net \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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

all inboxes | Powered by JetHome®