Message ID | 1713848917-13380-1-git-send-email-shengjiu.wang@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | clk: imx: imx8mp: Use modern pm_ops | expand |
On Tue, 23 Apr 2024 13:08:37 +0800, Shengjiu Wang wrote: > Without CONFIG_PM, the driver warns about unused functions > > ../drivers/clk/imx/clk-imx8mp-audiomix.c:363:12: warning: 'clk_imx8mp_audiomix_runtime_resume' defined but not used [-Wunused-function] > 363 | static int clk_imx8mp_audiomix_runtime_resume(struct device *dev) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../drivers/clk/imx/clk-imx8mp-audiomix.c:356:12: warning: 'clk_imx8mp_audiomix_runtime_suspend' defined but not used [-Wunused-function] > 356 | static int clk_imx8mp_audiomix_runtime_suspend(struct device *dev) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > [...] Applied, thanks! [1/1] clk: imx: imx8mp: Use modern pm_ops (no commit info) Best regards,
diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c index 574a032309c1..e4231e9c8f05 100644 --- a/drivers/clk/imx/clk-imx8mp-audiomix.c +++ b/drivers/clk/imx/clk-imx8mp-audiomix.c @@ -368,10 +368,10 @@ 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) - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(clk_imx8mp_audiomix_runtime_suspend, + clk_imx8mp_audiomix_runtime_resume, NULL) + NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) }; static const struct of_device_id clk_imx8mp_audiomix_of_match[] = { @@ -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), }, };
Without CONFIG_PM, the driver warns about unused functions ../drivers/clk/imx/clk-imx8mp-audiomix.c:363:12: warning: 'clk_imx8mp_audiomix_runtime_resume' defined but not used [-Wunused-function] 363 | static int clk_imx8mp_audiomix_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/clk/imx/clk-imx8mp-audiomix.c:356:12: warning: 'clk_imx8mp_audiomix_runtime_suspend' defined but not used [-Wunused-function] 356 | static int clk_imx8mp_audiomix_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change the old SET_RUNTIME_PM_OPS()/SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() helpers to their modern replacements that avoid the warning. Fixes: 1496dd413b2e ("clk: imx: imx8mp: Add pm_runtime support for power saving") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> --- drivers/clk/imx/clk-imx8mp-audiomix.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)