linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume
@ 2020-11-06 18:05 Randy Dunlap
  2020-11-06 18:17 ` Nathan Chancellor
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2020-11-06 18:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Rafael J. Wysocki, Len Brown, Pavel Machek,
	linux-pm, Michael Turquette, Stephen Boyd, linux-clk, Taniya Das,
	linux-next

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 <rdunlap@infradead.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: linux-pm@vger.kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: Taniya Das <tdas@codeaurora.org>
Cc: linux-next@vger.kernel.org
---
 include/linux/pm_clock.h |    9 +++++++++
 1 file changed, 9 insertions(+)

--- linux-next-20201106.orig/include/linux/pm_clock.h
+++ linux-next-20201106/include/linux/pm_clock.h
@@ -83,6 +83,15 @@ static inline void pm_clk_remove(struct
 static inline void pm_clk_remove_clk(struct device *dev, struct clk *clk)
 {
 }
+
+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_HAVE_CLK

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume
  2020-11-06 18:05 [PATCH -next] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume Randy Dunlap
@ 2020-11-06 18:17 ` Nathan Chancellor
  2020-11-06 22:41   ` Nathan Chancellor
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2020-11-06 18:17 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Rafael J. Wysocki, Len Brown, Pavel Machek,
	linux-pm, Michael Turquette, Stephen Boyd, linux-clk, Taniya Das,
	linux-next

On Fri, Nov 06, 2020 at 10:05:44AM -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 <rdunlap@infradead.org>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: linux-pm@vger.kernel.org
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: linux-clk@vger.kernel.org
> Cc: Taniya Das <tdas@codeaurora.org>
> Cc: linux-next@vger.kernel.org

This fixes the same build failure that I saw with s390 all{mod,yes}config.

Build-tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
>  include/linux/pm_clock.h |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> --- linux-next-20201106.orig/include/linux/pm_clock.h
> +++ linux-next-20201106/include/linux/pm_clock.h
> @@ -83,6 +83,15 @@ static inline void pm_clk_remove(struct
>  static inline void pm_clk_remove_clk(struct device *dev, struct clk *clk)
>  {
>  }
> +
> +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_HAVE_CLK

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume
  2020-11-06 18:17 ` Nathan Chancellor
@ 2020-11-06 22:41   ` Nathan Chancellor
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2020-11-06 22:41 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Rafael J. Wysocki, Len Brown, Pavel Machek,
	linux-pm, Michael Turquette, Stephen Boyd, linux-clk, Taniya Das,
	linux-next

On Fri, Nov 06, 2020 at 11:17:13AM -0700, Nathan Chancellor wrote:
> On Fri, Nov 06, 2020 at 10:05:44AM -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 <rdunlap@infradead.org>
> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > Cc: Len Brown <len.brown@intel.com>
> > Cc: Pavel Machek <pavel@ucw.cz>
> > Cc: linux-pm@vger.kernel.org
> > Cc: Michael Turquette <mturquette@baylibre.com>
> > Cc: Stephen Boyd <sboyd@kernel.org>
> > Cc: linux-clk@vger.kernel.org
> > Cc: Taniya Das <tdas@codeaurora.org>
> > Cc: linux-next@vger.kernel.org
> 
> This fixes the same build failure that I saw with s390 all{mod,yes}config.
> 
> Build-tested-by: Nathan Chancellor <natechancellor@gmail.com>
> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>

Actually, this breaks certain powerpc configs:

$ make -skj"$(nproc)" ARCH=powerpc CROSS_COMPILE=powerpc-linux- distclean ppc44x_defconfig drivers/base/power/common.o
In file included from drivers/base/power/common.c:11:
./include/linux/pm_clock.h:87:19: error: static declaration of 'pm_clk_runtime_suspend' follows non-static declaration
   87 | static inline int pm_clk_runtime_suspend(struct device *dev)
      |                   ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/pm_clock.h:23:12: note: previous declaration of 'pm_clk_runtime_suspend' was here
   23 | extern int pm_clk_runtime_suspend(struct device *dev);
      |            ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/pm_clock.h:91:19: error: static declaration of 'pm_clk_runtime_resume' follows non-static declaration
   91 | static inline int pm_clk_runtime_resume(struct device *dev)
      |                   ^~~~~~~~~~~~~~~~~~~~~
./include/linux/pm_clock.h:24:12: note: previous declaration of 'pm_clk_runtime_resume' was here
   24 | extern int pm_clk_runtime_resume(struct device *dev);
      |            ^~~~~~~~~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:283: drivers/base/power/common.o] Error 1
make[4]: Target '__build' not remade because of errors.
make[3]: *** [scripts/Makefile.build:500: drivers/base/power] Error 2
make[3]: Target '__build' not remade because of errors.
make[2]: *** [scripts/Makefile.build:500: drivers/base] Error 2
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1797: drivers] Error 2
make[1]: Target 'drivers/base/power/common.o' not remade because of errors.
make: *** [Makefile:335: __build_one_by_one] Error 2
make: Target 'distclean' not remade because of errors.
make: Target 'ppc44x_defconfig' not remade because of errors.
make: Target 'drivers/base/power/common.o' not remade because of errors.

I think this should be moved into the CONFIG_PM block at the top of the
file.

> > ---
> >  include/linux/pm_clock.h |    9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > --- linux-next-20201106.orig/include/linux/pm_clock.h
> > +++ linux-next-20201106/include/linux/pm_clock.h
> > @@ -83,6 +83,15 @@ static inline void pm_clk_remove(struct
> >  static inline void pm_clk_remove_clk(struct device *dev, struct clk *clk)
> >  {
> >  }
> > +
> > +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_HAVE_CLK

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-06 22:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 18:05 [PATCH -next] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume Randy Dunlap
2020-11-06 18:17 ` Nathan Chancellor
2020-11-06 22:41   ` Nathan Chancellor

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 NNTP newsgroup(s).