Linux-Clk Archive mirror
 help / color / mirror / Atom feed
From: Naresh Kamboju <naresh.kamboju@linaro.org>
To: Fabio Estevam <festevam@gmail.com>
Cc: abelvesa@kernel.org, imx@lists.linux.dev, shengjiu.wang@nxp.com,
	 linux-clk@vger.kernel.org, Fabio Estevam <festevam@denx.de>
Subject: Re: [PATCH] clk: imx: imx8mp: Switch to RUNTIME_PM_OPS()
Date: Thu, 2 May 2024 11:22:45 +0530	[thread overview]
Message-ID: <CA+G9fYvAbjZ26RBXmkMGUgO-sXSNFtsVZ8_2Y=JmuFknfL4ZxA@mail.gmail.com> (raw)
In-Reply-To: <20240429214502.1363592-1-festevam@gmail.com>

On Tue, 30 Apr 2024 at 03:15, Fabio Estevam <festevam@gmail.com> wrote:
>
> From: Fabio Estevam <festevam@denx.de>
>
> Replace SET_RUNTIME_PM_OPS() with its modern alternative RUNTIME_PM_OPS().
>
> The combined usage of pm_ptr() and RUNTIME_PM_OPS() allows the
> compiler to evaluate if the suspend/resume() functions are used at
> buid time or are simply dead code.
>
> This fixes the following s390 allmodconfig build errors:
>
> drivers/clk/imx/clk-imx8mp-audiomix.c:363:12: error:
> 'clk_imx8mp_audiomix_runtime_resume' defined but not used
> [-Werror=unused-function]
>   363 | static int clk_imx8mp_audiomix_runtime_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/clk/imx/clk-imx8mp-audiomix.c:356:12: error:
> 'clk_imx8mp_audiomix_runtime_suspend' defined but not used
> [-Werror=unused-function]
>   356 | static int clk_imx8mp_audiomix_runtime_suspend(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Closes: https://lore.kernel.org/linux-clk/CA+G9fYuP7S+a89Ep5g5_Ad69EMwRkJ8nM+MMTzbEcP+6H2oMXQ@mail.gmail.com/T/#u
> Fixes: 1496dd413b2e ("clk: imx: imx8mp: Add pm_runtime support for power saving")
> Signed-off-by: Fabio Estevam <festevam@denx.de>

Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>

Thanks for the fix patch.

> ---
>  drivers/clk/imx/clk-imx8mp-audiomix.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c
> index 574a032309c1..6a9b48b20cd6 100644
> --- a/drivers/clk/imx/clk-imx8mp-audiomix.c
> +++ b/drivers/clk/imx/clk-imx8mp-audiomix.c
> @@ -368,8 +368,8 @@ static int clk_imx8mp_audiomix_runtime_resume(struct device *dev)
>  }
>
>  static const struct dev_pm_ops clk_imx8mp_audiomix_pm_ops = {
> -       SET_RUNTIME_PM_OPS(clk_imx8mp_audiomix_runtime_suspend,
> -                          clk_imx8mp_audiomix_runtime_resume, NULL)
> +       RUNTIME_PM_OPS(clk_imx8mp_audiomix_runtime_suspend,
> +                      clk_imx8mp_audiomix_runtime_resume, NULL)
>         SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
>                                       pm_runtime_force_resume)
>  };
> @@ -386,7 +386,7 @@ static struct platform_driver clk_imx8mp_audiomix_driver = {
>         .driver = {
>                 .name = "imx8mp-audio-blk-ctrl",
>                 .of_match_table = clk_imx8mp_audiomix_of_match,
> -               .pm = &clk_imx8mp_audiomix_pm_ops,
> +               .pm = pm_ptr(&clk_imx8mp_audiomix_pm_ops),
>         },
>  };
>
> --
> 2.34.1


--
Linaro LKFT
https://lkft.linaro.org

      parent reply	other threads:[~2024-05-02  5:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 21:45 [PATCH] clk: imx: imx8mp: Switch to RUNTIME_PM_OPS() Fabio Estevam
2024-04-30  1:31 ` Peng Fan
2024-05-01 11:55 ` Abel Vesa
2024-05-02  5:52 ` Naresh Kamboju [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='CA+G9fYvAbjZ26RBXmkMGUgO-sXSNFtsVZ8_2Y=JmuFknfL4ZxA@mail.gmail.com' \
    --to=naresh.kamboju@linaro.org \
    --cc=abelvesa@kernel.org \
    --cc=festevam@denx.de \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-clk@vger.kernel.org \
    --cc=shengjiu.wang@nxp.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 read-only IMAP folder(s) and NNTP newsgroup(s).