Quoting zhuyinbo (2023-03-21 19:07:26)
在 2023/3/22 上午7:42, Stephen Boyd 写道:[....]
Quoting Yinbo Zhu (2023-03-21 06:07:10)
diff --git a/drivers/clk/clk-loongson2.c b/drivers/clk/clk-loongson2.c
new file mode 100644
index 000000000000..090810655511
--- /dev/null
+++ b/drivers/clk/clk-loongson2.c
@@ -0,0 +1,344 @@
Ok. Globals are frowned upon but it's just a single pointers so I guessNormally, this should be an element in the structure, but since there is+Why is this a global?
+static void __iomem *loongson2_pll_base;
only one
element, It is directly defined as a global variable for use by other
function.
it's Ok.
I mean get rid of the function loongson2_clocks_init() and move the codeThe loongson2_clocks_init had inline in this version, or do you mean something else ? Need to inline the probe?+ return PTR_ERR(loongson2_pll_base);Please inline this function here.
+
+ loongson2_clocks_init(dev);
in that function into this probe function. With this patch the probe is
split to two functions when it should be one function.