All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk/meson: Hold reference returned by of_get_parent()
@ 2022-06-24 10:27 ` Liang He
  0 siblings, 0 replies; 9+ messages in thread
From: Liang He @ 2022-06-24 10:27 UTC (permalink / raw)
  To: narmstrong, jbrunet, mturquette, sboyd, khilman,
	martin.blumenstingl, linux-amlogic, linux-clk, linux-arm-kernel,
	windhl

We should hold the reference returned by of_get_parent() and use it
to call of_node_put() for refcount balance.

Fixes: 88e2da81241e ("clk: meson: aoclk: refactor common code into dedicated file")
Fixes: 6682bd4d443f ("clk: meson: factorise meson64 peripheral clock controller drivers")
Fixes: bb6eddd1d28c ("clk: meson: meson8b: use the HHI syscon if available")
Signed-off-by: Liang He <windhl@126.com>
---
 these bugs are found in 5.19rc2
 these bugs are confirmed not fixed by lore.kernel.org
 these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig


 drivers/clk/meson/meson-aoclk.c | 5 ++++-
 drivers/clk/meson/meson-eeclk.c | 5 ++++-
 drivers/clk/meson/meson8b.c     | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/meson/meson-aoclk.c b/drivers/clk/meson/meson-aoclk.c
index 27cd2c1f3f61..434cd8f9de82 100644
--- a/drivers/clk/meson/meson-aoclk.c
+++ b/drivers/clk/meson/meson-aoclk.c
@@ -38,6 +38,7 @@ int meson_aoclkc_probe(struct platform_device *pdev)
 	struct meson_aoclk_reset_controller *rstc;
 	struct meson_aoclk_data *data;
 	struct device *dev = &pdev->dev;
+	struct device_node *np;
 	struct regmap *regmap;
 	int ret, clkid;
 
@@ -49,7 +50,9 @@ int meson_aoclkc_probe(struct platform_device *pdev)
 	if (!rstc)
 		return -ENOMEM;
 
-	regmap = syscon_node_to_regmap(of_get_parent(dev->of_node));
+	np = of_get_parent(dev->of_node);
+	regmap = syscon_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(regmap)) {
 		dev_err(dev, "failed to get regmap\n");
 		return PTR_ERR(regmap);
diff --git a/drivers/clk/meson/meson-eeclk.c b/drivers/clk/meson/meson-eeclk.c
index 8d5a5dab955a..0e5e6b57eb20 100644
--- a/drivers/clk/meson/meson-eeclk.c
+++ b/drivers/clk/meson/meson-eeclk.c
@@ -18,6 +18,7 @@ int meson_eeclkc_probe(struct platform_device *pdev)
 {
 	const struct meson_eeclkc_data *data;
 	struct device *dev = &pdev->dev;
+	struct device_node *np;
 	struct regmap *map;
 	int ret, i;
 
@@ -26,7 +27,9 @@ int meson_eeclkc_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	/* Get the hhi system controller node */
-	map = syscon_node_to_regmap(of_get_parent(dev->of_node));
+	np = of_get_parent(dev->of_node);
+	map = syscon_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(map)) {
 		dev_err(dev,
 			"failed to get HHI regmap\n");
diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index 8f3b7a94a667..54188319f349 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
 	struct clk *notifier_clk;
 	struct regmap *map;
 	int i, ret;
+	struct device_node *tp;
 
-	map = syscon_node_to_regmap(of_get_parent(np));
+	tp = of_get_parent(np);
+	map = syscon_node_to_regmap(tp);
+	of_node_put(tp);
 	if (IS_ERR(map)) {
 		pr_err("failed to get HHI regmap - Trying obsolete regs\n");
 		return;
-- 
2.25.1


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

* [PATCH] clk/meson: Hold reference returned by of_get_parent()
@ 2022-06-24 10:27 ` Liang He
  0 siblings, 0 replies; 9+ messages in thread
From: Liang He @ 2022-06-24 10:27 UTC (permalink / raw)
  To: narmstrong, jbrunet, mturquette, sboyd, khilman,
	martin.blumenstingl, linux-amlogic, linux-clk, linux-arm-kernel,
	windhl

We should hold the reference returned by of_get_parent() and use it
to call of_node_put() for refcount balance.

Fixes: 88e2da81241e ("clk: meson: aoclk: refactor common code into dedicated file")
Fixes: 6682bd4d443f ("clk: meson: factorise meson64 peripheral clock controller drivers")
Fixes: bb6eddd1d28c ("clk: meson: meson8b: use the HHI syscon if available")
Signed-off-by: Liang He <windhl@126.com>
---
 these bugs are found in 5.19rc2
 these bugs are confirmed not fixed by lore.kernel.org
 these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig


 drivers/clk/meson/meson-aoclk.c | 5 ++++-
 drivers/clk/meson/meson-eeclk.c | 5 ++++-
 drivers/clk/meson/meson8b.c     | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/meson/meson-aoclk.c b/drivers/clk/meson/meson-aoclk.c
index 27cd2c1f3f61..434cd8f9de82 100644
--- a/drivers/clk/meson/meson-aoclk.c
+++ b/drivers/clk/meson/meson-aoclk.c
@@ -38,6 +38,7 @@ int meson_aoclkc_probe(struct platform_device *pdev)
 	struct meson_aoclk_reset_controller *rstc;
 	struct meson_aoclk_data *data;
 	struct device *dev = &pdev->dev;
+	struct device_node *np;
 	struct regmap *regmap;
 	int ret, clkid;
 
@@ -49,7 +50,9 @@ int meson_aoclkc_probe(struct platform_device *pdev)
 	if (!rstc)
 		return -ENOMEM;
 
-	regmap = syscon_node_to_regmap(of_get_parent(dev->of_node));
+	np = of_get_parent(dev->of_node);
+	regmap = syscon_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(regmap)) {
 		dev_err(dev, "failed to get regmap\n");
 		return PTR_ERR(regmap);
diff --git a/drivers/clk/meson/meson-eeclk.c b/drivers/clk/meson/meson-eeclk.c
index 8d5a5dab955a..0e5e6b57eb20 100644
--- a/drivers/clk/meson/meson-eeclk.c
+++ b/drivers/clk/meson/meson-eeclk.c
@@ -18,6 +18,7 @@ int meson_eeclkc_probe(struct platform_device *pdev)
 {
 	const struct meson_eeclkc_data *data;
 	struct device *dev = &pdev->dev;
+	struct device_node *np;
 	struct regmap *map;
 	int ret, i;
 
@@ -26,7 +27,9 @@ int meson_eeclkc_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	/* Get the hhi system controller node */
-	map = syscon_node_to_regmap(of_get_parent(dev->of_node));
+	np = of_get_parent(dev->of_node);
+	map = syscon_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(map)) {
 		dev_err(dev,
 			"failed to get HHI regmap\n");
diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index 8f3b7a94a667..54188319f349 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
 	struct clk *notifier_clk;
 	struct regmap *map;
 	int i, ret;
+	struct device_node *tp;
 
-	map = syscon_node_to_regmap(of_get_parent(np));
+	tp = of_get_parent(np);
+	map = syscon_node_to_regmap(tp);
+	of_node_put(tp);
 	if (IS_ERR(map)) {
 		pr_err("failed to get HHI regmap - Trying obsolete regs\n");
 		return;
-- 
2.25.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH] clk/meson: Hold reference returned by of_get_parent()
@ 2022-06-24 10:27 ` Liang He
  0 siblings, 0 replies; 9+ messages in thread
From: Liang He @ 2022-06-24 10:27 UTC (permalink / raw)
  To: narmstrong, jbrunet, mturquette, sboyd, khilman,
	martin.blumenstingl, linux-amlogic, linux-clk, linux-arm-kernel,
	windhl

We should hold the reference returned by of_get_parent() and use it
to call of_node_put() for refcount balance.

Fixes: 88e2da81241e ("clk: meson: aoclk: refactor common code into dedicated file")
Fixes: 6682bd4d443f ("clk: meson: factorise meson64 peripheral clock controller drivers")
Fixes: bb6eddd1d28c ("clk: meson: meson8b: use the HHI syscon if available")
Signed-off-by: Liang He <windhl@126.com>
---
 these bugs are found in 5.19rc2
 these bugs are confirmed not fixed by lore.kernel.org
 these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig


 drivers/clk/meson/meson-aoclk.c | 5 ++++-
 drivers/clk/meson/meson-eeclk.c | 5 ++++-
 drivers/clk/meson/meson8b.c     | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/meson/meson-aoclk.c b/drivers/clk/meson/meson-aoclk.c
index 27cd2c1f3f61..434cd8f9de82 100644
--- a/drivers/clk/meson/meson-aoclk.c
+++ b/drivers/clk/meson/meson-aoclk.c
@@ -38,6 +38,7 @@ int meson_aoclkc_probe(struct platform_device *pdev)
 	struct meson_aoclk_reset_controller *rstc;
 	struct meson_aoclk_data *data;
 	struct device *dev = &pdev->dev;
+	struct device_node *np;
 	struct regmap *regmap;
 	int ret, clkid;
 
@@ -49,7 +50,9 @@ int meson_aoclkc_probe(struct platform_device *pdev)
 	if (!rstc)
 		return -ENOMEM;
 
-	regmap = syscon_node_to_regmap(of_get_parent(dev->of_node));
+	np = of_get_parent(dev->of_node);
+	regmap = syscon_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(regmap)) {
 		dev_err(dev, "failed to get regmap\n");
 		return PTR_ERR(regmap);
diff --git a/drivers/clk/meson/meson-eeclk.c b/drivers/clk/meson/meson-eeclk.c
index 8d5a5dab955a..0e5e6b57eb20 100644
--- a/drivers/clk/meson/meson-eeclk.c
+++ b/drivers/clk/meson/meson-eeclk.c
@@ -18,6 +18,7 @@ int meson_eeclkc_probe(struct platform_device *pdev)
 {
 	const struct meson_eeclkc_data *data;
 	struct device *dev = &pdev->dev;
+	struct device_node *np;
 	struct regmap *map;
 	int ret, i;
 
@@ -26,7 +27,9 @@ int meson_eeclkc_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	/* Get the hhi system controller node */
-	map = syscon_node_to_regmap(of_get_parent(dev->of_node));
+	np = of_get_parent(dev->of_node);
+	map = syscon_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(map)) {
 		dev_err(dev,
 			"failed to get HHI regmap\n");
diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index 8f3b7a94a667..54188319f349 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
 	struct clk *notifier_clk;
 	struct regmap *map;
 	int i, ret;
+	struct device_node *tp;
 
-	map = syscon_node_to_regmap(of_get_parent(np));
+	tp = of_get_parent(np);
+	map = syscon_node_to_regmap(tp);
+	of_node_put(tp);
 	if (IS_ERR(map)) {
 		pr_err("failed to get HHI regmap - Trying obsolete regs\n");
 		return;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] clk/meson: Hold reference returned by of_get_parent()
  2022-06-24 10:27 ` Liang He
  (?)
@ 2022-06-26 22:02   ` Martin Blumenstingl
  -1 siblings, 0 replies; 9+ messages in thread
From: Martin Blumenstingl @ 2022-06-26 22:02 UTC (permalink / raw)
  To: Liang He
  Cc: Neil Armstrong, jbrunet, mturquette, sboyd, khilman,
	linux-amlogic, linux-clk, linux-arm-kernel

Hello,

thank you for submitting this patch!

On Fri, Jun 24, 2022 at 12:28 PM Liang He <windhl@126.com> wrote:
[...]
>  these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig
Please note that you're changing some drivers which are only in the
arch/arm/configs/multi_v7_defconfig while others are only in
arch/arm64/configs/defconfig
I think at91_dt_defconfig will not compile any of the drivers below

[...]
> diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
> index 8f3b7a94a667..54188319f349 100644
> --- a/drivers/clk/meson/meson8b.c
> +++ b/drivers/clk/meson/meson8b.c
> @@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
>         struct clk *notifier_clk;
>         struct regmap *map;
>         int i, ret;
> +       struct device_node *tp;
This function uses reverse christmas tree sorting, so the longest line
goes on top while the shortest should stay on the bottom.
Can you please explain what "tp" stands for? Personally I would call
this variable parent_np, but maybe "tp" has a similar meaning.


Best regards,
Martin

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

* Re: [PATCH] clk/meson: Hold reference returned by of_get_parent()
@ 2022-06-26 22:02   ` Martin Blumenstingl
  0 siblings, 0 replies; 9+ messages in thread
From: Martin Blumenstingl @ 2022-06-26 22:02 UTC (permalink / raw)
  To: Liang He
  Cc: Neil Armstrong, jbrunet, mturquette, sboyd, khilman,
	linux-amlogic, linux-clk, linux-arm-kernel

Hello,

thank you for submitting this patch!

On Fri, Jun 24, 2022 at 12:28 PM Liang He <windhl@126.com> wrote:
[...]
>  these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig
Please note that you're changing some drivers which are only in the
arch/arm/configs/multi_v7_defconfig while others are only in
arch/arm64/configs/defconfig
I think at91_dt_defconfig will not compile any of the drivers below

[...]
> diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
> index 8f3b7a94a667..54188319f349 100644
> --- a/drivers/clk/meson/meson8b.c
> +++ b/drivers/clk/meson/meson8b.c
> @@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
>         struct clk *notifier_clk;
>         struct regmap *map;
>         int i, ret;
> +       struct device_node *tp;
This function uses reverse christmas tree sorting, so the longest line
goes on top while the shortest should stay on the bottom.
Can you please explain what "tp" stands for? Personally I would call
this variable parent_np, but maybe "tp" has a similar meaning.


Best regards,
Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH] clk/meson: Hold reference returned by of_get_parent()
@ 2022-06-26 22:02   ` Martin Blumenstingl
  0 siblings, 0 replies; 9+ messages in thread
From: Martin Blumenstingl @ 2022-06-26 22:02 UTC (permalink / raw)
  To: Liang He
  Cc: Neil Armstrong, jbrunet, mturquette, sboyd, khilman,
	linux-amlogic, linux-clk, linux-arm-kernel

Hello,

thank you for submitting this patch!

On Fri, Jun 24, 2022 at 12:28 PM Liang He <windhl@126.com> wrote:
[...]
>  these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig
Please note that you're changing some drivers which are only in the
arch/arm/configs/multi_v7_defconfig while others are only in
arch/arm64/configs/defconfig
I think at91_dt_defconfig will not compile any of the drivers below

[...]
> diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
> index 8f3b7a94a667..54188319f349 100644
> --- a/drivers/clk/meson/meson8b.c
> +++ b/drivers/clk/meson/meson8b.c
> @@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
>         struct clk *notifier_clk;
>         struct regmap *map;
>         int i, ret;
> +       struct device_node *tp;
This function uses reverse christmas tree sorting, so the longest line
goes on top while the shortest should stay on the bottom.
Can you please explain what "tp" stands for? Personally I would call
this variable parent_np, but maybe "tp" has a similar meaning.


Best regards,
Martin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re:Re: [PATCH] clk/meson: Hold reference returned by of_get_parent()
  2022-06-26 22:02   ` Martin Blumenstingl
  (?)
@ 2022-06-26 23:42     ` Liang He
  -1 siblings, 0 replies; 9+ messages in thread
From: Liang He @ 2022-06-26 23:42 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Neil Armstrong, jbrunet, mturquette, sboyd, khilman,
	linux-amlogic, linux-clk, linux-arm-kernel



At 2022-06-27 06:02:45, "Martin Blumenstingl" <martin.blumenstingl@googlemail.com> wrote:
>Hello,
>
>thank you for submitting this patch!
>
>On Fri, Jun 24, 2022 at 12:28 PM Liang He <windhl@126.com> wrote:
>[...]
>>  these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig
>Please note that you're changing some drivers which are only in the
>arch/arm/configs/multi_v7_defconfig while others are only in
>arch/arm64/configs/defconfig
>I think at91_dt_defconfig will not compile any of the drivers below
>

Hi, Martin.

To simplify the building test, I use the at91_dt_defconfig to build .config
for these similar bugs in clk-at91, clk-sprd,etc.
Then I use following command to complete different compile tests for clk-meson:

make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON8B=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson8b.o
make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON_EE_CLKC=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson-eeclk.o
make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON_AO_CLKC=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson-aoclk.o

I will add these detailed compile commands in my version-2 patch and also in future patch commit.

>[...]
>> diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
>> index 8f3b7a94a667..54188319f349 100644
>> --- a/drivers/clk/meson/meson8b.c
>> +++ b/drivers/clk/meson/meson8b.c
>> @@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
>>         struct clk *notifier_clk;
>>         struct regmap *map;
>>         int i, ret;
>> +       struct device_node *tp;
>This function uses reverse christmas tree sorting, so the longest line
>goes on top while the shortest should stay on the bottom.
>Can you please explain what "tp" stands for? Personally I would call
>this variable parent_np, but maybe "tp" has a similar meaning.
>
>
>Best regards,
>Martin

Thanks very much, Martin.

I will send version-2 patch to keep the  reverse christmas tree.
And I will follow this rule in my future patch code.

I just want to ues 'tp' as 'tmp_pointer', but your advice is
more reasonable and I will change that in version-2 patch.

Liang

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

* Re:Re: [PATCH] clk/meson: Hold reference returned by of_get_parent()
@ 2022-06-26 23:42     ` Liang He
  0 siblings, 0 replies; 9+ messages in thread
From: Liang He @ 2022-06-26 23:42 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Neil Armstrong, jbrunet, mturquette, sboyd, khilman,
	linux-amlogic, linux-clk, linux-arm-kernel



At 2022-06-27 06:02:45, "Martin Blumenstingl" <martin.blumenstingl@googlemail.com> wrote:
>Hello,
>
>thank you for submitting this patch!
>
>On Fri, Jun 24, 2022 at 12:28 PM Liang He <windhl@126.com> wrote:
>[...]
>>  these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig
>Please note that you're changing some drivers which are only in the
>arch/arm/configs/multi_v7_defconfig while others are only in
>arch/arm64/configs/defconfig
>I think at91_dt_defconfig will not compile any of the drivers below
>

Hi, Martin.

To simplify the building test, I use the at91_dt_defconfig to build .config
for these similar bugs in clk-at91, clk-sprd,etc.
Then I use following command to complete different compile tests for clk-meson:

make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON8B=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson8b.o
make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON_EE_CLKC=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson-eeclk.o
make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON_AO_CLKC=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson-aoclk.o

I will add these detailed compile commands in my version-2 patch and also in future patch commit.

>[...]
>> diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
>> index 8f3b7a94a667..54188319f349 100644
>> --- a/drivers/clk/meson/meson8b.c
>> +++ b/drivers/clk/meson/meson8b.c
>> @@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
>>         struct clk *notifier_clk;
>>         struct regmap *map;
>>         int i, ret;
>> +       struct device_node *tp;
>This function uses reverse christmas tree sorting, so the longest line
>goes on top while the shortest should stay on the bottom.
>Can you please explain what "tp" stands for? Personally I would call
>this variable parent_np, but maybe "tp" has a similar meaning.
>
>
>Best regards,
>Martin

Thanks very much, Martin.

I will send version-2 patch to keep the  reverse christmas tree.
And I will follow this rule in my future patch code.

I just want to ues 'tp' as 'tmp_pointer', but your advice is
more reasonable and I will change that in version-2 patch.

Liang
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re:Re: [PATCH] clk/meson: Hold reference returned by of_get_parent()
@ 2022-06-26 23:42     ` Liang He
  0 siblings, 0 replies; 9+ messages in thread
From: Liang He @ 2022-06-26 23:42 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Neil Armstrong, jbrunet, mturquette, sboyd, khilman,
	linux-amlogic, linux-clk, linux-arm-kernel



At 2022-06-27 06:02:45, "Martin Blumenstingl" <martin.blumenstingl@googlemail.com> wrote:
>Hello,
>
>thank you for submitting this patch!
>
>On Fri, Jun 24, 2022 at 12:28 PM Liang He <windhl@126.com> wrote:
>[...]
>>  these bugs are compiled tested in 5.19rc2 with at91_dt_defconfig
>Please note that you're changing some drivers which are only in the
>arch/arm/configs/multi_v7_defconfig while others are only in
>arch/arm64/configs/defconfig
>I think at91_dt_defconfig will not compile any of the drivers below
>

Hi, Martin.

To simplify the building test, I use the at91_dt_defconfig to build .config
for these similar bugs in clk-at91, clk-sprd,etc.
Then I use following command to complete different compile tests for clk-meson:

make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON8B=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson8b.o
make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON_EE_CLKC=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson-eeclk.o
make CONFIG_ARCH_MESON=y CONFIG_COMMON_CLK_MESON_AO_CLKC=y CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm ./drivers/clk/meson/meson-aoclk.o

I will add these detailed compile commands in my version-2 patch and also in future patch commit.

>[...]
>> diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
>> index 8f3b7a94a667..54188319f349 100644
>> --- a/drivers/clk/meson/meson8b.c
>> +++ b/drivers/clk/meson/meson8b.c
>> @@ -3796,8 +3796,11 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
>>         struct clk *notifier_clk;
>>         struct regmap *map;
>>         int i, ret;
>> +       struct device_node *tp;
>This function uses reverse christmas tree sorting, so the longest line
>goes on top while the shortest should stay on the bottom.
>Can you please explain what "tp" stands for? Personally I would call
>this variable parent_np, but maybe "tp" has a similar meaning.
>
>
>Best regards,
>Martin

Thanks very much, Martin.

I will send version-2 patch to keep the  reverse christmas tree.
And I will follow this rule in my future patch code.

I just want to ues 'tp' as 'tmp_pointer', but your advice is
more reasonable and I will change that in version-2 patch.

Liang
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-06-26 23:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 10:27 [PATCH] clk/meson: Hold reference returned by of_get_parent() Liang He
2022-06-24 10:27 ` Liang He
2022-06-24 10:27 ` Liang He
2022-06-26 22:02 ` Martin Blumenstingl
2022-06-26 22:02   ` Martin Blumenstingl
2022-06-26 22:02   ` Martin Blumenstingl
2022-06-26 23:42   ` Liang He
2022-06-26 23:42     ` Liang He
2022-06-26 23:42     ` Liang He

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.