public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Dong Aisheng <aisheng.dong@nxp.com>,
	Guoniu Zhou <guoniu.zhou@nxp.com>,
	Stefan Riedmueller <s.riedmueller@phytec.de>,
	Arnd Bergmann <arnd@arndb.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Christian Hemp <c.hemp@phytec.de>,
	Jacopo Mondi <jacopo@jmondi.org>,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: nxp: ignore unused suspend operations
Date: Tue, 18 Apr 2023 10:30:57 +0300	[thread overview]
Message-ID: <20230418073057.GD4703@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230418071605.2971866-1-arnd@kernel.org>

Hi Arnd,

Thank you for the patch.

On Tue, Apr 18, 2023 at 09:15:51AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> gcc warns about some functions being unused when CONFIG_PM is
> disabled:
> 
> drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:328:12: error: 'mxc_isi_pm_resume' defined but not used [-Werror=unused-function]
>   328 | static int mxc_isi_pm_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~
> drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:314:12: error: 'mxc_isi_pm_suspend' defined but not used [-Werror=unused-function]
>   314 | static int mxc_isi_pm_suspend(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~~
> 
> Use the modern SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() helpers in place
> of the old SET_SYSTEM_SLEEP_PM_OPS()/SET_RUNTIME_PM_OPS() ones, and add
> a pm_ptr() check to ensure they get dropped by the compiler.

I've also sent a patch for this one :-) See
https://lore.kernel.org/linux-media/20230417053949.7395-2-laurent.pinchart@ideasonboard.com/T/#u.

Your patch looks better, so

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> index 238521622b75..253e77189b69 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> @@ -378,8 +378,8 @@ static int mxc_isi_runtime_resume(struct device *dev)
>  }
>  
>  static const struct dev_pm_ops mxc_isi_pm_ops = {
> -	SET_SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume)
> -	SET_RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL)
> +	SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume)
> +	RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL)
>  };
>  
>  /* -----------------------------------------------------------------------------
> @@ -528,7 +528,7 @@ static struct platform_driver mxc_isi_driver = {
>  	.driver = {
>  		.of_match_table = mxc_isi_of_match,
>  		.name		= MXC_ISI_DRIVER_NAME,
> -		.pm		= &mxc_isi_pm_ops,
> +		.pm		= pm_ptr(&mxc_isi_pm_ops),
>  	}
>  };
>  module_platform_driver(mxc_isi_driver);

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-04-18  7:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18  7:15 [PATCH] media: nxp: ignore unused suspend operations Arnd Bergmann
2023-04-18  7:30 ` Laurent Pinchart [this message]
2023-04-18  8:04 ` Hans Verkuil
2023-04-18  8:09   ` Arnd Bergmann
2023-04-18  8:19   ` Laurent Pinchart
2023-04-18  8:23     ` Hans Verkuil
2023-04-18  9:20     ` Arnd Bergmann

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=20230418073057.GD4703@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=aisheng.dong@nxp.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=c.hemp@phytec.de \
    --cc=festevam@gmail.com \
    --cc=guoniu.zhou@nxp.com \
    --cc=jacopo@jmondi.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=s.riedmueller@phytec.de \
    --cc=shawnguo@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