All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init()
@ 2022-06-08  2:11 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2022-06-08  2:11 UTC (permalink / raw)
  To: weiyongjun1, Michael Turquette, Stephen Boyd, Maxime Coquelin,
	Alexandre Torgue, Philipp Zabel, Gabriel Fernandez
  Cc: linux-clk, linux-stm32, linux-arm-kernel, kernel-janitors, Hulk Robot

The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.

Fixes: 637cee5ffc71 ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/clk/stm32/reset-stm32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/stm32/reset-stm32.c b/drivers/clk/stm32/reset-stm32.c
index 040870130e4b..e89381528af9 100644
--- a/drivers/clk/stm32/reset-stm32.c
+++ b/drivers/clk/stm32/reset-stm32.c
@@ -111,6 +111,7 @@ int stm32_rcc_reset_init(struct device *dev, const struct of_device_id *match,
 	if (!reset_data)
 		return -ENOMEM;
 
+	spin_lock_init(&reset_data->lock);
 	reset_data->membase = base;
 	reset_data->rcdev.owner = THIS_MODULE;
 	reset_data->rcdev.ops = &stm32_reset_ops;


_______________________________________________
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] 6+ messages in thread

* [PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init()
@ 2022-06-08  2:11 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2022-06-08  2:11 UTC (permalink / raw)
  To: weiyongjun1, Michael Turquette, Stephen Boyd, Maxime Coquelin,
	Alexandre Torgue, Philipp Zabel, Gabriel Fernandez
  Cc: linux-clk, linux-stm32, linux-arm-kernel, kernel-janitors, Hulk Robot

The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.

Fixes: 637cee5ffc71 ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/clk/stm32/reset-stm32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/stm32/reset-stm32.c b/drivers/clk/stm32/reset-stm32.c
index 040870130e4b..e89381528af9 100644
--- a/drivers/clk/stm32/reset-stm32.c
+++ b/drivers/clk/stm32/reset-stm32.c
@@ -111,6 +111,7 @@ int stm32_rcc_reset_init(struct device *dev, const struct of_device_id *match,
 	if (!reset_data)
 		return -ENOMEM;
 
+	spin_lock_init(&reset_data->lock);
 	reset_data->membase = base;
 	reset_data->rcdev.owner = THIS_MODULE;
 	reset_data->rcdev.ops = &stm32_reset_ops;


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

* Re: [PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init()
  2022-06-08  2:11 ` Wei Yongjun
@ 2022-06-09 12:24   ` Gabriel FERNANDEZ
  -1 siblings, 0 replies; 6+ messages in thread
From: Gabriel FERNANDEZ @ 2022-06-09 12:24 UTC (permalink / raw)
  To: Wei Yongjun, Michael Turquette, Stephen Boyd, Maxime Coquelin,
	Alexandre Torgue, Philipp Zabel
  Cc: linux-clk, linux-stm32, linux-arm-kernel, kernel-janitors, Hulk Robot

Hi Wei Yongjun,

Thank's,

you can add tested-by and reviewed-by Gabriel Fernandez 
<gabriel.fernandez@foss.st.com>

Best Regards

Gabriel Fernandez


On 6/8/22 04:11, Wei Yongjun wrote:
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
>
> Fixes: 637cee5ffc71 ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   drivers/clk/stm32/reset-stm32.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/stm32/reset-stm32.c b/drivers/clk/stm32/reset-stm32.c
> index 040870130e4b..e89381528af9 100644
> --- a/drivers/clk/stm32/reset-stm32.c
> +++ b/drivers/clk/stm32/reset-stm32.c
> @@ -111,6 +111,7 @@ int stm32_rcc_reset_init(struct device *dev, const struct of_device_id *match,
>   	if (!reset_data)
>   		return -ENOMEM;
>   
> +	spin_lock_init(&reset_data->lock);
>   	reset_data->membase = base;
>   	reset_data->rcdev.owner = THIS_MODULE;
>   	reset_data->rcdev.ops = &stm32_reset_ops;
>

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

* Re: [PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init()
@ 2022-06-09 12:24   ` Gabriel FERNANDEZ
  0 siblings, 0 replies; 6+ messages in thread
From: Gabriel FERNANDEZ @ 2022-06-09 12:24 UTC (permalink / raw)
  To: Wei Yongjun, Michael Turquette, Stephen Boyd, Maxime Coquelin,
	Alexandre Torgue, Philipp Zabel
  Cc: linux-clk, linux-stm32, linux-arm-kernel, kernel-janitors, Hulk Robot

Hi Wei Yongjun,

Thank's,

you can add tested-by and reviewed-by Gabriel Fernandez 
<gabriel.fernandez@foss.st.com>

Best Regards

Gabriel Fernandez


On 6/8/22 04:11, Wei Yongjun wrote:
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
>
> Fixes: 637cee5ffc71 ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   drivers/clk/stm32/reset-stm32.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/stm32/reset-stm32.c b/drivers/clk/stm32/reset-stm32.c
> index 040870130e4b..e89381528af9 100644
> --- a/drivers/clk/stm32/reset-stm32.c
> +++ b/drivers/clk/stm32/reset-stm32.c
> @@ -111,6 +111,7 @@ int stm32_rcc_reset_init(struct device *dev, const struct of_device_id *match,
>   	if (!reset_data)
>   		return -ENOMEM;
>   
> +	spin_lock_init(&reset_data->lock);
>   	reset_data->membase = base;
>   	reset_data->rcdev.owner = THIS_MODULE;
>   	reset_data->rcdev.ops = &stm32_reset_ops;
>

_______________________________________________
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] 6+ messages in thread

* Re: [PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init()
  2022-06-08  2:11 ` Wei Yongjun
@ 2022-06-09 22:34   ` Stephen Boyd
  -1 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2022-06-09 22:34 UTC (permalink / raw)
  To: Alexandre Torgue, Gabriel Fernandez, Maxime Coquelin,
	Michael Turquette, Philipp Zabel, weiyongjun1
  Cc: linux-clk, linux-stm32, linux-arm-kernel, kernel-janitors, Hulk Robot

Quoting Wei Yongjun (2022-06-07 19:11:54)
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
> 
> Fixes: 637cee5ffc71 ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---

Applied to clk-fixes

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

* Re: [PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init()
@ 2022-06-09 22:34   ` Stephen Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2022-06-09 22:34 UTC (permalink / raw)
  To: Alexandre Torgue, Gabriel Fernandez, Maxime Coquelin,
	Michael Turquette, Philipp Zabel, weiyongjun1
  Cc: linux-clk, linux-stm32, linux-arm-kernel, kernel-janitors, Hulk Robot

Quoting Wei Yongjun (2022-06-07 19:11:54)
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
> 
> Fixes: 637cee5ffc71 ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---

Applied to clk-fixes

_______________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2022-06-09 22:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08  2:11 [PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init() Wei Yongjun
2022-06-08  2:11 ` Wei Yongjun
2022-06-09 12:24 ` Gabriel FERNANDEZ
2022-06-09 12:24   ` Gabriel FERNANDEZ
2022-06-09 22:34 ` Stephen Boyd
2022-06-09 22:34   ` Stephen Boyd

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.