Skip to contentSkip to conversation

mips: lantiq: add support for clk_set_parent()

PATCH Applied Randy Dunlap 3 participants 3 messages Dec 29, 2021 – Jan 3, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: lantiq: add support for clk_set_parent()

Provide a simple implementation of clk_set_parent() in the lantiq subarch so that callers of it will build without errors.

Fixes these build errors:

ERROR: modpost: "clk_set_parent" [sound/soc/jz4740/snd-soc-jz4740-i2s.ko] undefined!
ERROR: modpost: "clk_set_parent" [sound/soc/atmel/snd-soc-atmel-i2s.ko] undefined!

Fixes 171bb2f19ed6 ("MIPS: Lantiq: Add initial support for Lantiq SoCs")

[email protected] --cc="John Crispin <[email protected]>" --cc="Jonathan Cameron <[email protected]>" --cc="Russell King <[email protected]>" --cc="Andy Shevchenko <[email protected]>" [email protected] --to="Thomas Bogendoerfer <[email protected]>"

---
 arch/mips/lantiq/clk.c |    6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/lantiq/clk.c +6 -0
@@ -164,6 +164,12 @@ struct clk *clk_get_parent(struct clk *c
 }
 EXPORT_SYMBOL(clk_get_parent);
 
+int clk_set_parent(struct clk *clk, struct clk *parent)
+{
+	return 0;
+}
+EXPORT_SYMBOL(clk_set_parent);
+
 static inline u32 get_counter_resolution(void)
 {
 	u32 res;
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Tue, 28 Dec 2021 16:03:45 -0800 Randy Dunlap <[email protected]> wrote:

Provide a simple implementation of clk_set_parent() in the lantiq subarch so that callers of it will build without errors.

Fixes these build errors:

Quoted 7 lines

ERROR: modpost: "clk_set_parent" [sound/soc/jz4740/snd-soc-jz4740-i2s.ko] undefined!
ERROR: modpost: "clk_set_parent" [sound/soc/atmel/snd-soc-atmel-i2s.ko] undefined!

Fixes 171bb2f19ed6 ("MIPS: Lantiq: Add initial support for Lantiq SoCs")

[email protected] --cc="John Crispin <[email protected]>" --cc="Jonathan Cameron <[email protected]>" --cc="Russell King <[email protected]>" --cc="Andy Shevchenko <[email protected]>" [email protected] --to="Thomas Bogendoerfer <[email protected]>"

I guess hitting this sooner or later was inevitable given the recent fix of adding clk_get_parent() to these two. It might be worth adding a WARN_ON() or similar to this function though so we know if anything ever actually hits it at runtime. Seems like at least some of the other similar stubs do so (omap1 for example).

With or without a warning, LGTM

Quoted 19 lines
---
 arch/mips/lantiq/clk.c |    6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/lantiq/clk.c +6 -0
@@ -164,6 +164,12 @@ struct clk *clk_get_parent(struct clk *c
 }
 EXPORT_SYMBOL(clk_get_parent);
 
+int clk_set_parent(struct clk *clk, struct clk *parent)
+{
+	return 0;
+}
+EXPORT_SYMBOL(clk_set_parent);
+
 static inline u32 get_counter_resolution(void)
 {
 	u32 res;
maintainer Applied
#2 lore raw
In reply to Randy Dunlap
Quoted 8 lines · Randy Dunlap

Provide a simple implementation of clk_set_parent() in the lantiq subarch so that callers of it will build without errors.

Fixes these build errors:

ERROR: modpost: "clk_set_parent" [sound/soc/jz4740/snd-soc-jz4740-i2s.ko] undefined!
ERROR: modpost: "clk_set_parent" [sound/soc/atmel/snd-soc-atmel-i2s.ko] undefined!

Quoted 7 lines
Fixes 171bb2f19ed6 ("MIPS: Lantiq: Add initial support for Lantiq SoCs")

[email protected] --cc="John Crispin <[email protected]>" --cc="Jonathan Cameron <[email protected]>" --cc="Russell King <[email protected]>" --cc="Andy Shevchenko <[email protected]>" [email protected] --to="Thomas Bogendoerfer <[email protected]>"

---
 arch/mips/lantiq/clk.c |    6 ++++++
 1 file changed, 6 insertions(+)

applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]