2020-11-09 03:23:29

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH -next v2] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume

Add stubs for pm_clk_runtime_suspend() and pm_clk_runtime_resume()
to fix build errors when CONFIG_PM and CONFIG_PM_CLK are not enabled.

Fixes these build errors:

../drivers/clk/qcom/camcc-sc7180.c: In function ‘cam_cc_sc7180_probe’:
../drivers/clk/qcom/camcc-sc7180.c:1672:8: error: implicit declaration of function ‘pm_clk_runtime_resume’; did you mean ‘pm_runtime_resume’? [-Werror=implicit-function-declaration]
ret = pm_clk_runtime_resume(&pdev->dev);
^~~~~~~~~~~~~~~~~~~~~
../drivers/clk/qcom/camcc-sc7180.c:1681:3: error: implicit declaration of function ‘pm_clk_runtime_suspend’; did you mean ‘pm_runtime_suspend’? [-Werror=implicit-function-declaration]
pm_clk_runtime_suspend(&pdev->dev);
^~~~~~~~~~~~~~~~~~~~~~

Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180")
Signed-off-by: Randy Dunlap <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: [email protected]
Cc: Michael Turquette <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: [email protected]
Cc: Taniya Das <[email protected]>
Cc: [email protected]
Cc: Nathan Chancellor <[email protected]>
Cc: Andrew Morton <[email protected]>
---
v2: move the function stubs to be inside the #else (for !CONFIG_PM)
as suggested by Nathan to fix another build error

include/linux/pm_clock.h | 8 ++++++++
1 file changed, 8 insertions(+)

--- linux-next-20201106.orig/include/linux/pm_clock.h
+++ linux-next-20201106/include/linux/pm_clock.h
@@ -27,6 +27,14 @@ extern int pm_clk_runtime_resume(struct
.runtime_resume = pm_clk_runtime_resume,
#else
#define USE_PM_CLK_RUNTIME_OPS
+static inline int pm_clk_runtime_suspend(struct device *dev)
+{
+ return 0;
+}
+static inline int pm_clk_runtime_resume(struct device *dev)
+{
+ return 0;
+}
#endif

#ifdef CONFIG_PM_CLK


2020-11-10 00:25:53

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH -next v2] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume

Hi all,

On Sun, 8 Nov 2020 19:21:15 -0800 Randy Dunlap <[email protected]> wrote:
>
> Add stubs for pm_clk_runtime_suspend() and pm_clk_runtime_resume()
> to fix build errors when CONFIG_PM and CONFIG_PM_CLK are not enabled.
>
> Fixes these build errors:
>
> ../drivers/clk/qcom/camcc-sc7180.c: In function ‘cam_cc_sc7180_probe’:
> ../drivers/clk/qcom/camcc-sc7180.c:1672:8: error: implicit declaration of function ‘pm_clk_runtime_resume’; did you mean ‘pm_runtime_resume’? [-Werror=implicit-function-declaration]
> ret = pm_clk_runtime_resume(&pdev->dev);
> ^~~~~~~~~~~~~~~~~~~~~
> ../drivers/clk/qcom/camcc-sc7180.c:1681:3: error: implicit declaration of function ‘pm_clk_runtime_suspend’; did you mean ‘pm_runtime_suspend’? [-Werror=implicit-function-declaration]
> pm_clk_runtime_suspend(&pdev->dev);
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180")
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: Len Brown <[email protected]>
> Cc: Pavel Machek <[email protected]>
> Cc: [email protected]
> Cc: Michael Turquette <[email protected]>
> Cc: Stephen Boyd <[email protected]>
> Cc: [email protected]
> Cc: Taniya Das <[email protected]>
> Cc: [email protected]
> Cc: Nathan Chancellor <[email protected]>
> Cc: Andrew Morton <[email protected]>
> ---
> v2: move the function stubs to be inside the #else (for !CONFIG_PM)
> as suggested by Nathan to fix another build error
>
> include/linux/pm_clock.h | 8 ++++++++
> 1 file changed, 8 insertions(+)

I have added this to the merge of to clk tree in linux-next today
(pending it being added to the clk tree itself).

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-11-10 01:12:45

by Nathan Chancellor

[permalink] [raw]
Subject: Re: [PATCH -next v2] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume

On Sun, Nov 08, 2020 at 07:21:15PM -0800, Randy Dunlap wrote:
> Add stubs for pm_clk_runtime_suspend() and pm_clk_runtime_resume()
> to fix build errors when CONFIG_PM and CONFIG_PM_CLK are not enabled.
>
> Fixes these build errors:
>
> ../drivers/clk/qcom/camcc-sc7180.c: In function ‘cam_cc_sc7180_probe’:
> ../drivers/clk/qcom/camcc-sc7180.c:1672:8: error: implicit declaration of function ‘pm_clk_runtime_resume’; did you mean ‘pm_runtime_resume’? [-Werror=implicit-function-declaration]
> ret = pm_clk_runtime_resume(&pdev->dev);
> ^~~~~~~~~~~~~~~~~~~~~
> ../drivers/clk/qcom/camcc-sc7180.c:1681:3: error: implicit declaration of function ‘pm_clk_runtime_suspend’; did you mean ‘pm_runtime_suspend’? [-Werror=implicit-function-declaration]
> pm_clk_runtime_suspend(&pdev->dev);
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180")
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: Len Brown <[email protected]>
> Cc: Pavel Machek <[email protected]>
> Cc: [email protected]
> Cc: Michael Turquette <[email protected]>
> Cc: Stephen Boyd <[email protected]>
> Cc: [email protected]
> Cc: Taniya Das <[email protected]>
> Cc: [email protected]
> Cc: Nathan Chancellor <[email protected]>
> Cc: Andrew Morton <[email protected]>

Build-tested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>

> ---
> v2: move the function stubs to be inside the #else (for !CONFIG_PM)
> as suggested by Nathan to fix another build error
>
> include/linux/pm_clock.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> --- linux-next-20201106.orig/include/linux/pm_clock.h
> +++ linux-next-20201106/include/linux/pm_clock.h
> @@ -27,6 +27,14 @@ extern int pm_clk_runtime_resume(struct
> .runtime_resume = pm_clk_runtime_resume,
> #else
> #define USE_PM_CLK_RUNTIME_OPS
> +static inline int pm_clk_runtime_suspend(struct device *dev)
> +{
> + return 0;
> +}
> +static inline int pm_clk_runtime_resume(struct device *dev)
> +{
> + return 0;
> +}
> #endif
>
> #ifdef CONFIG_PM_CLK

2020-11-10 17:48:25

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH -next v2] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume

On Mon, Nov 9, 2020 at 4:21 AM Randy Dunlap <[email protected]> wrote:
>
> Add stubs for pm_clk_runtime_suspend() and pm_clk_runtime_resume()
> to fix build errors when CONFIG_PM and CONFIG_PM_CLK are not enabled.
>
> Fixes these build errors:
>
> ../drivers/clk/qcom/camcc-sc7180.c: In function ‘cam_cc_sc7180_probe’:
> ../drivers/clk/qcom/camcc-sc7180.c:1672:8: error: implicit declaration of function ‘pm_clk_runtime_resume’; did you mean ‘pm_runtime_resume’? [-Werror=implicit-function-declaration]
> ret = pm_clk_runtime_resume(&pdev->dev);
> ^~~~~~~~~~~~~~~~~~~~~
> ../drivers/clk/qcom/camcc-sc7180.c:1681:3: error: implicit declaration of function ‘pm_clk_runtime_suspend’; did you mean ‘pm_runtime_suspend’? [-Werror=implicit-function-declaration]
> pm_clk_runtime_suspend(&pdev->dev);
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180")
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: Len Brown <[email protected]>
> Cc: Pavel Machek <[email protected]>
> Cc: [email protected]
> Cc: Michael Turquette <[email protected]>
> Cc: Stephen Boyd <[email protected]>
> Cc: [email protected]
> Cc: Taniya Das <[email protected]>
> Cc: [email protected]
> Cc: Nathan Chancellor <[email protected]>
> Cc: Andrew Morton <[email protected]>
> ---
> v2: move the function stubs to be inside the #else (for !CONFIG_PM)
> as suggested by Nathan to fix another build error
>
> include/linux/pm_clock.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> --- linux-next-20201106.orig/include/linux/pm_clock.h
> +++ linux-next-20201106/include/linux/pm_clock.h
> @@ -27,6 +27,14 @@ extern int pm_clk_runtime_resume(struct
> .runtime_resume = pm_clk_runtime_resume,
> #else
> #define USE_PM_CLK_RUNTIME_OPS
> +static inline int pm_clk_runtime_suspend(struct device *dev)
> +{
> + return 0;
> +}
> +static inline int pm_clk_runtime_resume(struct device *dev)
> +{
> + return 0;
> +}
> #endif
>
> #ifdef CONFIG_PM_CLK

Applied to the PM tree as 5.10-rc material, thanks!

2020-11-10 21:33:24

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH -next v2] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume

Hi Rafael,

On Tue, 10 Nov 2020 18:43:04 +0100 "Rafael J. Wysocki" <[email protected]> wrote:
>
> > Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180")
>
> Applied to the PM tree as 5.10-rc material, thanks!

The problem is that the commit that this one fixes is in the clk tree
not the pm tree, so this patch needs to (also) be in the clk tree to
reduced bisect problems.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-11-12 15:04:08

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH -next v2] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume

Hi Stephen,

On Tue, Nov 10, 2020 at 10:30 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi Rafael,
>
> On Tue, 10 Nov 2020 18:43:04 +0100 "Rafael J. Wysocki" <[email protected]> wrote:
> >
> > > Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180")
> >
> > Applied to the PM tree as 5.10-rc material, thanks!
>
> The problem is that the commit that this one fixes is in the clk tree
> not the pm tree, so this patch needs to (also) be in the clk tree to
> reduced bisect problems.

OK, dropping from pm then.