linux-next: build failure after merge of the clk tree
Hi all,
After merging the clk tree, today's linux-next build (arm omap1_defconfig and many others) failed like this:
In file included from drivers/clk/clkdev.c:22:0:drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non-static declaration include/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw' was here
Caused by commit
59fcdce425b7 ("clk: Remove ifdef for COMMON_CLK in clk-provider.h")
This commit exposed the CONFIG_COMMON_CLK version of the __clk_get_hw() declaration to non CONFIG_COMMON_CLK code (where there is a static declaration of __clk_get_hw() (which is BTW missing an "inline") in drivers/clk/clk.h.
We need something like this (untested):
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Jul 2019 09:58:18 +1000
Subject: [PATCH] clk: for up for "clk: Remove ifdef for COMMON_CLK in
clk-provider.h"
We were getting errors like:
In file included from drivers/clk/clkdev.c:22:0:drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non -static declarationinclude/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw ' was here
--- drivers/clk/clk.h | 2 +- include/linux/clk-provider.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/clk/clk.h +1 -1
@@ -33,7 +33,7 @@ clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id, {return (struct clk *)hw; } -static struct clk_hw *__clk_get_hw (struct clk *clk) +static inline struct clk_hw *__clk_get_hw (struct clk *clk) {return (struct clk_hw *)clk; }
include/linux/clk-provider.h +3 -0
@@ -805,7 +805,10 @@ void devm_clk_hw_unregister(struct device *dev, struct clk_hw *hw);/* helper functions */ const char *__clk_get_name (const struct clk *clk);const char *clk_hw_get_name (const struct clk_hw *hw); +#ifdef CONFIG_COMON_CLK +/* There is a !CONFIG_COMMON_CLK static inline for this in drivers/clk/clk.h */ struct clk_hw *__clk_get_hw (struct clk *clk); +#endif unsigned int clk_hw_get_num_parents (const struct clk_hw *hw);struct clk_hw *clk_hw_get_parent (const struct clk_hw *hw); struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw,
Signature · 5 lines
2.20.1 -- Cheers, Stephen Rothwell
Hi all,
Quoted 2 lines · On Tue, 2 Jul 2019 10:01:03 +1000 Stephen Rothwell <[email protected]> wrote:
We need something like this (untested):
simple testing shows build errors ... we need something better.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 6 lines · On Tue, 2 Jul 2019 11:14:55 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 2 lines · On Tue, 2 Jul 2019 10:01:03 +1000 Stephen Rothwell <[email protected]> wrote:
We need something like this (untested):
simple testing shows build errors ... we need something better.
This at least passes my (few) build tests (this will be in linux-next today):
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Jul 2019 11:53:07 +1000
Subject: [PATCH] clk: consoldiate the __clk_get_hw() declarations
Without this we were getting errors like:
In file included from drivers/clk/clkdev.c:22:0:drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non-static declaration include/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw' was here
--- drivers/clk/clk.h | 4 ---- drivers/clk/imx/clk-imx6q.c | 1 + drivers/clk/imx/clk-imx6sll.c | 1 + drivers/clk/imx/clk-imx6sx.c | 1 + drivers/clk/imx/clk-imx6ul.c | 1 + drivers/clk/imx/clk-imx7d.c | 1 + drivers/clk/imx/clk.c | 1 + include/linux/clk-provider.h | 7 +++++++ 8 files changed, 13 insertions(+), 4 deletions(-)
drivers/clk/clk.h +0 -4
@@ -33,10 +33,6 @@ clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id, {return (struct clk *)hw; } -static struct clk_hw *__clk_get_hw (struct clk *clk) -{ -return (struct clk_hw *)clk; -}static inline void __clk_put (struct clk *clk) { }#endif
drivers/clk/imx/clk-imx6q.c +1 -0
@@ -14,6 +14,7 @@#include <linux/types.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/io.h> #include <linux/of.h>
drivers/clk/imx/clk-imx6sll.c +1 -0
@@ -7,6 +7,7 @@#include <dt-bindings/clock/imx6sll-clock.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/init.h> #include <linux/io.h>
drivers/clk/imx/clk-imx6sx.c +1 -0
@@ -12,6 +12,7 @@#include <dt-bindings/clock/imx6sx-clock.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/init.h> #include <linux/io.h>
drivers/clk/imx/clk-imx6ul.c +1 -0
@@ -12,6 +12,7 @@#include <dt-bindings/clock/imx6ul-clock.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/init.h> #include <linux/io.h>
drivers/clk/imx/clk-imx7d.c +1 -0
@@ -12,6 +12,7 @@#include <dt-bindings/clock/imx7d-clock.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/init.h> #include <linux/io.h>
drivers/clk/imx/clk.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #include <linux/clk.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/io.h> #include <linux/of.h>
include/linux/clk-provider.h +7 -0
@@ -805,7 +805,14 @@ void devm_clk_hw_unregister(struct device *dev, struct clk_hw *hw);/* helper functions */ const char *__clk_get_name (const struct clk *clk);const char *clk_hw_get_name (const struct clk_hw *hw); +#ifdef CONFIG_COMMON_CLK struct clk_hw *__clk_get_hw (struct clk *clk); +#else +static inline struct clk_hw *__clk_get_hw (struct clk *clk) +{ +return (struct clk_hw *)clk; +} +#endif unsigned int clk_hw_get_num_parents (const struct clk_hw *hw);struct clk_hw *clk_hw_get_parent (const struct clk_hw *hw); struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw,
Signature · 5 lines
2.20.1 -- Cheers, Stephen Rothwell
Hi all,
Quoted 123 lines · On Tue, 2 Jul 2019 12:03:50 +1000 Stephen Rothwell <[email protected]> wrote:
This at least passes my (few) build tests (this will be in linux-next today):
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Jul 2019 11:53:07 +1000
Subject: [PATCH] clk: consoldiate the__clk_get_hw()declarationsWithout this we were getting errors like:
In file included from
drivers/clk/clkdev.c:22:0:drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non-static declarationinclude/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw' was hereFixes 59fcdce425b7 ("clk: Remove ifdef for COMMON_CLK in clk-provider.h")Fixes 73e0e496afda ("clkdev: Always allocate a struct clk and call __clk_get() w/ CCF")Signed-off-by Stephen Rothwell <[email protected]>--- drivers/clk/clk.h | 4 ---- drivers/clk/imx/clk-imx6q.c | 1 + drivers/clk/imx/clk-imx6sll.c | 1 + drivers/clk/imx/clk-imx6sx.c | 1 + drivers/clk/imx/clk-imx6ul.c | 1 + drivers/clk/imx/clk-imx7d.c | 1 + drivers/clk/imx/clk.c | 1 + include/linux/clk-provider.h | 7 +++++++ 8 files changed, 13 insertions(+), 4 deletions(-)drivers/clk/clk.h +0
-4@@ -33,10 +33,6 @@ clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id, {return (struct clk *)hw; } -static struct clk_hw *__clk_get_hw (struct clk *clk) -{ -return (struct clk_hw *)clk; -}static inline void __clk_put (struct clk *clk) { }#endif drivers/clk/imx/clk-imx6q.c +1
-0@@ -14,6 +14,7 @@#include <linux/types.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/io.h> #include <linux/of.h> drivers/clk/imx/clk-imx6sll.c +1
-0@@ -7,6 +7,7 @@#include <dt-bindings/clock/imx6sll-clock.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/init.h> #include <linux/io.h> drivers/clk/imx/clk-imx6sx.c +1
-0@@ -12,6 +12,7 @@#include <dt-bindings/clock/imx6sx-clock.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/init.h> #include <linux/io.h> drivers/clk/imx/clk-imx6ul.c +1
-0@@ -12,6 +12,7 @@#include <dt-bindings/clock/imx6ul-clock.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/init.h> #include <linux/io.h> drivers/clk/imx/clk-imx7d.c +1
-0@@ -12,6 +12,7 @@#include <dt-bindings/clock/imx7d-clock.h> #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/init.h> #include <linux/io.h> drivers/clk/imx/clk.c +1
-0@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #include <linux/clk.h> +#include <linux/clk-provider.h> #include <linux/err.h> #include <linux/io.h> #include <linux/of.h> include/linux/clk-provider.h +1
-0@@ -805,7 +805,14 @@ void devm_clk_hw_unregister(struct device *dev, struct clk_hw *hw);/* helper functions */ const char *__clk_get_name (const struct clk *clk);const char *clk_hw_get_name (const struct clk_hw *hw); +#ifdef CONFIG_COMMON_CLK
include/linux/clk-provider.h void devm_clk_hw_unregister(struct device *dev, struct clk_hw *hw); · line 818
Quoted 10 lines
include/linux/clk-provider.h +6
-0struct clk_hw *__clk_get_hw (struct clk *clk); +#else +static inline struct clk_hw *__clk_get_hw (struct clk *clk) +{ +return (struct clk_hw *)clk; +} +#endif unsigned int clk_hw_get_num_parents (const struct clk_hw *hw);struct clk_hw *clk_hw_get_parent (const struct clk_hw *hw); struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw,
I am still applying this ...
Signature · 2 lines
Cheers, Stephen Rothwell
Stephen Boyd
maintainerQuoting Stephen Rothwell (2019-07-01 19:03:50)
Quoted 19 lines
Hi all,
Quoted 6 lines · On Tue, 2 Jul 2019 11:14:55 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 2 lines · On Tue, 2 Jul 2019 10:01:03 +1000 Stephen Rothwell <[email protected]> wrote:
We need something like this (untested):
simple testing shows build errors ... we need something better.
This at least passes my (few) build tests (this will be in linux-next today):
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Jul 2019 11:53:07 +1000
Subject: [PATCH] clk: consoldiate the__clk_get_hw()declarationsWithout this we were getting errors like:
Quoted 7 lines
In file included from
drivers/clk/clkdev.c:22:0:drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non-static declarationinclude/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw' was hereFixes 59fcdce425b7 ("clk: Remove ifdef for COMMON_CLK in clk-provider.h")Fixes 73e0e496afda ("clkdev: Always allocate a struct clk and call __clk_get() w/ CCF")Signed-off-by Stephen Rothwell <[email protected]>
Thanks for fixing this. I didn't run all the configs it seems.
I'll pull this into the clk pile now.