All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] pwm: meson: Fix missing spin_lock_init()
@ 2016-09-10  6:38 ` Wei Yongjun
  0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2016-09-10  6:38 UTC (permalink / raw)
  To: Thierry Reding, Carlo Caione, Kevin Hilman, Neil Armstrong
  Cc: Wei Yongjun, linux-pwm, linux-arm-kernel, linux-amlogic

From: Wei Yongjun <weiyongjun1@huawei.com>

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

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pwm/pwm-meson.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index bfbbe7f..778d088 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
 	if (IS_ERR(meson->base))
 		return PTR_ERR(meson->base);
 
+	spin_lock_init(&meson->lock);
 	meson->chip.dev = &pdev->dev;
 	meson->chip.ops = &meson_pwm_ops;
 	meson->chip.base = -1;

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

* [PATCH -next] pwm: meson: Fix missing spin_lock_init()
@ 2016-09-10  6:38 ` Wei Yongjun
  0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2016-09-10  6:38 UTC (permalink / raw)
  To: linux-arm-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>

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

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pwm/pwm-meson.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index bfbbe7f..778d088 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
 	if (IS_ERR(meson->base))
 		return PTR_ERR(meson->base);
 
+	spin_lock_init(&meson->lock);
 	meson->chip.dev = &pdev->dev;
 	meson->chip.ops = &meson_pwm_ops;
 	meson->chip.base = -1;

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

* [PATCH -next] pwm: meson: Fix missing spin_lock_init()
@ 2016-09-10  6:38 ` Wei Yongjun
  0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2016-09-10  6:38 UTC (permalink / raw)
  To: linus-amlogic

From: Wei Yongjun <weiyongjun1@huawei.com>

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

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pwm/pwm-meson.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index bfbbe7f..778d088 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
 	if (IS_ERR(meson->base))
 		return PTR_ERR(meson->base);
 
+	spin_lock_init(&meson->lock);
 	meson->chip.dev = &pdev->dev;
 	meson->chip.ops = &meson_pwm_ops;
 	meson->chip.base = -1;

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

* Re: [PATCH -next] pwm: meson: Fix missing spin_lock_init()
  2016-09-10  6:38 ` Wei Yongjun
  (?)
@ 2016-09-10 13:54   ` Neil Armstrong
  -1 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2016-09-10 13:54 UTC (permalink / raw)
  To: Wei Yongjun, Thierry Reding, Carlo Caione, Kevin Hilman
  Cc: Wei Yongjun, linux-pwm, linux-arm-kernel, linux-amlogic

Le 10/09/2016 08:38, Wei Yongjun a écrit :
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
> 
> This is detected by Coccinelle semantic patch.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/pwm/pwm-meson.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> index bfbbe7f..778d088 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
>  	if (IS_ERR(meson->base))
>  		return PTR_ERR(meson->base);
>  
> +	spin_lock_init(&meson->lock);
>  	meson->chip.dev = &pdev->dev;
>  	meson->chip.ops = &meson_pwm_ops;
>  	meson->chip.base = -1;
> 

Thanks for the fix, but it was already posted earlier by Axel Lin <axel.lin@ingics.com>

Thierry will decide which one to merge.

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks,
Neil

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

* [PATCH -next] pwm: meson: Fix missing spin_lock_init()
@ 2016-09-10 13:54   ` Neil Armstrong
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2016-09-10 13:54 UTC (permalink / raw)
  To: linux-arm-kernel

Le 10/09/2016 08:38, Wei Yongjun a ?crit :
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
> 
> This is detected by Coccinelle semantic patch.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/pwm/pwm-meson.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> index bfbbe7f..778d088 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
>  	if (IS_ERR(meson->base))
>  		return PTR_ERR(meson->base);
>  
> +	spin_lock_init(&meson->lock);
>  	meson->chip.dev = &pdev->dev;
>  	meson->chip.ops = &meson_pwm_ops;
>  	meson->chip.base = -1;
> 

Thanks for the fix, but it was already posted earlier by Axel Lin <axel.lin@ingics.com>

Thierry will decide which one to merge.

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks,
Neil

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

* [PATCH -next] pwm: meson: Fix missing spin_lock_init()
@ 2016-09-10 13:54   ` Neil Armstrong
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2016-09-10 13:54 UTC (permalink / raw)
  To: linus-amlogic

Le 10/09/2016 08:38, Wei Yongjun a ?crit :
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
> 
> This is detected by Coccinelle semantic patch.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/pwm/pwm-meson.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> index bfbbe7f..778d088 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
>  	if (IS_ERR(meson->base))
>  		return PTR_ERR(meson->base);
>  
> +	spin_lock_init(&meson->lock);
>  	meson->chip.dev = &pdev->dev;
>  	meson->chip.ops = &meson_pwm_ops;
>  	meson->chip.base = -1;
> 

Thanks for the fix, but it was already posted earlier by Axel Lin <axel.lin@ingics.com>

Thierry will decide which one to merge.

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks,
Neil

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

* Re: [PATCH -next] pwm: meson: Fix missing spin_lock_init()
  2016-09-10 13:54   ` Neil Armstrong
  (?)
@ 2016-10-21  7:11     ` Thierry Reding
  -1 siblings, 0 replies; 9+ messages in thread
From: Thierry Reding @ 2016-10-21  7:11 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Wei Yongjun, Carlo Caione, Kevin Hilman, Wei Yongjun, linux-pwm,
	linux-arm-kernel, linux-amlogic

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

On Sat, Sep 10, 2016 at 03:54:11PM +0200, Neil Armstrong wrote:
> Le 10/09/2016 08:38, Wei Yongjun a écrit :
> > From: Wei Yongjun <weiyongjun1@huawei.com>
> > 
> > The driver allocates the spinlock but not initialize it.
> > Use spin_lock_init() on it to initialize it correctly.
> > 
> > This is detected by Coccinelle semantic patch.
> > 
> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> > ---
> >  drivers/pwm/pwm-meson.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> > index bfbbe7f..778d088 100644
> > --- a/drivers/pwm/pwm-meson.c
> > +++ b/drivers/pwm/pwm-meson.c
> > @@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
> >  	if (IS_ERR(meson->base))
> >  		return PTR_ERR(meson->base);
> >  
> > +	spin_lock_init(&meson->lock);
> >  	meson->chip.dev = &pdev->dev;
> >  	meson->chip.ops = &meson_pwm_ops;
> >  	meson->chip.base = -1;
> > 
> 
> Thanks for the fix, but it was already posted earlier by Axel Lin <axel.lin@ingics.com>
> 
> Thierry will decide which one to merge.
> 
> Acked-by: Neil Armstrong <narmstrong@baylibre.com>

I've applied Axel's patch.

Thanks,
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [PATCH -next] pwm: meson: Fix missing spin_lock_init()
@ 2016-10-21  7:11     ` Thierry Reding
  0 siblings, 0 replies; 9+ messages in thread
From: Thierry Reding @ 2016-10-21  7:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 10, 2016 at 03:54:11PM +0200, Neil Armstrong wrote:
> Le 10/09/2016 08:38, Wei Yongjun a ?crit :
> > From: Wei Yongjun <weiyongjun1@huawei.com>
> > 
> > The driver allocates the spinlock but not initialize it.
> > Use spin_lock_init() on it to initialize it correctly.
> > 
> > This is detected by Coccinelle semantic patch.
> > 
> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> > ---
> >  drivers/pwm/pwm-meson.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> > index bfbbe7f..778d088 100644
> > --- a/drivers/pwm/pwm-meson.c
> > +++ b/drivers/pwm/pwm-meson.c
> > @@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
> >  	if (IS_ERR(meson->base))
> >  		return PTR_ERR(meson->base);
> >  
> > +	spin_lock_init(&meson->lock);
> >  	meson->chip.dev = &pdev->dev;
> >  	meson->chip.ops = &meson_pwm_ops;
> >  	meson->chip.base = -1;
> > 
> 
> Thanks for the fix, but it was already posted earlier by Axel Lin <axel.lin@ingics.com>
> 
> Thierry will decide which one to merge.
> 
> Acked-by: Neil Armstrong <narmstrong@baylibre.com>

I've applied Axel's patch.

Thanks,
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161021/c8c0227d/attachment.sig>

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

* [PATCH -next] pwm: meson: Fix missing spin_lock_init()
@ 2016-10-21  7:11     ` Thierry Reding
  0 siblings, 0 replies; 9+ messages in thread
From: Thierry Reding @ 2016-10-21  7:11 UTC (permalink / raw)
  To: linus-amlogic

On Sat, Sep 10, 2016 at 03:54:11PM +0200, Neil Armstrong wrote:
> Le 10/09/2016 08:38, Wei Yongjun a ?crit :
> > From: Wei Yongjun <weiyongjun1@huawei.com>
> > 
> > The driver allocates the spinlock but not initialize it.
> > Use spin_lock_init() on it to initialize it correctly.
> > 
> > This is detected by Coccinelle semantic patch.
> > 
> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> > ---
> >  drivers/pwm/pwm-meson.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> > index bfbbe7f..778d088 100644
> > --- a/drivers/pwm/pwm-meson.c
> > +++ b/drivers/pwm/pwm-meson.c
> > @@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
> >  	if (IS_ERR(meson->base))
> >  		return PTR_ERR(meson->base);
> >  
> > +	spin_lock_init(&meson->lock);
> >  	meson->chip.dev = &pdev->dev;
> >  	meson->chip.ops = &meson_pwm_ops;
> >  	meson->chip.base = -1;
> > 
> 
> Thanks for the fix, but it was already posted earlier by Axel Lin <axel.lin@ingics.com>
> 
> Thierry will decide which one to merge.
> 
> Acked-by: Neil Armstrong <narmstrong@baylibre.com>

I've applied Axel's patch.

Thanks,
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20161021/c8c0227d/attachment.sig>

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

end of thread, other threads:[~2016-10-21  7:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-10  6:38 [PATCH -next] pwm: meson: Fix missing spin_lock_init() Wei Yongjun
2016-09-10  6:38 ` Wei Yongjun
2016-09-10  6:38 ` Wei Yongjun
2016-09-10 13:54 ` Neil Armstrong
2016-09-10 13:54   ` Neil Armstrong
2016-09-10 13:54   ` Neil Armstrong
2016-10-21  7:11   ` Thierry Reding
2016-10-21  7:11     ` Thierry Reding
2016-10-21  7:11     ` Thierry Reding

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.