Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Rafał Miłecki

On 2017-06-20 09:58, Willy Tarreau wrote:

On Tue, Jun 20, 2017 at 09:31:00AM +0200, Rafal Milecki wrote:

Do you know if my name will appear correctly in git [0]?

[0] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?h=linux-3.10.y


I would have almost promised it was going to be OK but it's bogus so
it probably happened during the patch manipulation, thus I'll fix it
before the final release :


https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/linux-stable.git/commit/?h=linux-3.10.y-queue=73148299c53be25


OK, thanks!


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Rafał Miłecki

On 2017-06-20 09:58, Willy Tarreau wrote:

On Tue, Jun 20, 2017 at 09:31:00AM +0200, Rafal Milecki wrote:

Do you know if my name will appear correctly in git [0]?

[0] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?h=linux-3.10.y


I would have almost promised it was going to be OK but it's bogus so
it probably happened during the patch manipulation, thus I'll fix it
before the final release :


https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/linux-stable.git/commit/?h=linux-3.10.y-queue=73148299c53be25


OK, thanks!


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Rafał Miłecki

On 2017-06-20 08:14, Willy Tarreau wrote:

On Tue, Jun 20, 2017 at 08:12:26AM +0300, Kalle Valo wrote:

Willy Tarreau  writes:

> From: Rafał Miłecki 
>
> commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.
>
> This allows tracking device state and e.g. makes devm work as expected.
>
> Signed-off-by: Rafał Miłecki 
> Signed-off-by: Kalle Valo 
> Signed-off-by: Willy Tarreau 

UTF-8 characters seem to be broken.


I've just checked and the commit properly contains C582 here.


At least the content type on your mail looks wrong:

Content-Type: text/plain; charset=latin1


I'm defaulting to latin1 but I don't know how to change the default 
only
to send a series, so that indeed results in such things from time to 
time

during reviews, I'm sorry.


Do you know if my name will appear correctly in git [0]?

[0] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?h=linux-3.10.y


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Rafał Miłecki

On 2017-06-20 08:14, Willy Tarreau wrote:

On Tue, Jun 20, 2017 at 08:12:26AM +0300, Kalle Valo wrote:

Willy Tarreau  writes:

> From: Rafał Miłecki 
>
> commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.
>
> This allows tracking device state and e.g. makes devm work as expected.
>
> Signed-off-by: Rafał Miłecki 
> Signed-off-by: Kalle Valo 
> Signed-off-by: Willy Tarreau 

UTF-8 characters seem to be broken.


I've just checked and the commit properly contains C582 here.


At least the content type on your mail looks wrong:

Content-Type: text/plain; charset=latin1


I'm defaulting to latin1 but I don't know how to change the default 
only
to send a series, so that indeed results in such things from time to 
time

during reviews, I'm sorry.


Do you know if my name will appear correctly in git [0]?

[0] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?h=linux-3.10.y


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Willy Tarreau
On Tue, Jun 20, 2017 at 10:14:05AM +0200, Rafal Milecki wrote:
> On 2017-06-20 09:58, Willy Tarreau wrote:
> > On Tue, Jun 20, 2017 at 09:31:00AM +0200, Rafal Milecki wrote:
> > > Do you know if my name will appear correctly in git [0]?
> > > 
> > > [0] 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?h=linux-3.10.y
> > 
> > I would have almost promised it was going to be OK but it's bogus so
> > it probably happened during the patch manipulation, thus I'll fix it
> > before the final release :
> > 
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/linux-stable.git/commit/?h=linux-3.10.y-queue=73148299c53be25
> 
> OK, thanks!

I've now fixed it but I found a few other occurrences, I'm going to fix
all of them at once.

Cheers,
willy


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Willy Tarreau
On Tue, Jun 20, 2017 at 10:14:05AM +0200, Rafal Milecki wrote:
> On 2017-06-20 09:58, Willy Tarreau wrote:
> > On Tue, Jun 20, 2017 at 09:31:00AM +0200, Rafal Milecki wrote:
> > > Do you know if my name will appear correctly in git [0]?
> > > 
> > > [0] 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?h=linux-3.10.y
> > 
> > I would have almost promised it was going to be OK but it's bogus so
> > it probably happened during the patch manipulation, thus I'll fix it
> > before the final release :
> > 
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/linux-stable.git/commit/?h=linux-3.10.y-queue=73148299c53be25
> 
> OK, thanks!

I've now fixed it but I found a few other occurrences, I'm going to fix
all of them at once.

Cheers,
willy


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Willy Tarreau
On Tue, Jun 20, 2017 at 09:31:00AM +0200, Rafal Milecki wrote:
> Do you know if my name will appear correctly in git [0]?
> 
> [0] 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?h=linux-3.10.y

I would have almost promised it was going to be OK but it's bogus so
it probably happened during the patch manipulation, thus I'll fix it
before the final release :

   
https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/linux-stable.git/commit/?h=linux-3.10.y-queue=73148299c53be25

Willy


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Willy Tarreau
On Tue, Jun 20, 2017 at 09:31:00AM +0200, Rafal Milecki wrote:
> Do you know if my name will appear correctly in git [0]?
> 
> [0] 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?h=linux-3.10.y

I would have almost promised it was going to be OK but it's bogus so
it probably happened during the patch manipulation, thus I'll fix it
before the final release :

   
https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/linux-stable.git/commit/?h=linux-3.10.y-queue=73148299c53be25

Willy


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Willy Tarreau
On Tue, Jun 20, 2017 at 08:12:26AM +0300, Kalle Valo wrote:
> Willy Tarreau  writes:
> 
> > From: Rafał Miłecki 
> >
> > commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.
> >
> > This allows tracking device state and e.g. makes devm work as expected.
> >
> > Signed-off-by: Rafał Miłecki 
> > Signed-off-by: Kalle Valo 
> > Signed-off-by: Willy Tarreau 
> 
> UTF-8 characters seem to be broken.

I've just checked and the commit properly contains C582 here.

> At least the content type on your mail looks wrong:
> 
> Content-Type: text/plain; charset=latin1

I'm defaulting to latin1 but I don't know how to change the default only
to send a series, so that indeed results in such things from time to time
during reviews, I'm sorry.

Regards,
Willy


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-20 Thread Willy Tarreau
On Tue, Jun 20, 2017 at 08:12:26AM +0300, Kalle Valo wrote:
> Willy Tarreau  writes:
> 
> > From: Rafał Miłecki 
> >
> > commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.
> >
> > This allows tracking device state and e.g. makes devm work as expected.
> >
> > Signed-off-by: Rafał Miłecki 
> > Signed-off-by: Kalle Valo 
> > Signed-off-by: Willy Tarreau 
> 
> UTF-8 characters seem to be broken.

I've just checked and the commit properly contains C582 here.

> At least the content type on your mail looks wrong:
> 
> Content-Type: text/plain; charset=latin1

I'm defaulting to latin1 but I don't know how to change the default only
to send a series, so that indeed results in such things from time to time
during reviews, I'm sorry.

Regards,
Willy


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-19 Thread Kalle Valo
Willy Tarreau  writes:

> From: Rafał Miłecki 
>
> commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.
>
> This allows tracking device state and e.g. makes devm work as expected.
>
> Signed-off-by: Rafał Miłecki 
> Signed-off-by: Kalle Valo 
> Signed-off-by: Willy Tarreau 

UTF-8 characters seem to be broken. At least the content type on your
mail looks wrong:

Content-Type: text/plain; charset=latin1

-- 
Kalle Valo


Re: [PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-19 Thread Kalle Valo
Willy Tarreau  writes:

> From: Rafał Miłecki 
>
> commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.
>
> This allows tracking device state and e.g. makes devm work as expected.
>
> Signed-off-by: Rafał Miłecki 
> Signed-off-by: Kalle Valo 
> Signed-off-by: Willy Tarreau 

UTF-8 characters seem to be broken. At least the content type on your
mail looks wrong:

Content-Type: text/plain; charset=latin1

-- 
Kalle Valo


[PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-19 Thread Willy Tarreau
From: Rafał Miłecki 

commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.

This allows tracking device state and e.g. makes devm work as expected.

Signed-off-by: Rafał Miłecki 
Signed-off-by: Kalle Valo 
Signed-off-by: Willy Tarreau 
---
 drivers/bcma/main.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index f72f52b..65e3687 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -432,8 +432,11 @@ static int bcma_device_probe(struct device *dev)
   drv);
int err = 0;
 
+   get_device(dev);
if (adrv->probe)
err = adrv->probe(core);
+   if (err)
+   put_device(dev);
 
return err;
 }
@@ -446,6 +449,7 @@ static int bcma_device_remove(struct device *dev)
 
if (adrv->remove)
adrv->remove(core);
+   put_device(dev);
 
return 0;
 }
-- 
2.8.0.rc2.1.gbe9624a



[PATCH 3.10 162/268] bcma: use (get|put)_device when probing/removing device driver

2017-06-19 Thread Willy Tarreau
From: Rafał Miłecki 

commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.

This allows tracking device state and e.g. makes devm work as expected.

Signed-off-by: Rafał Miłecki 
Signed-off-by: Kalle Valo 
Signed-off-by: Willy Tarreau 
---
 drivers/bcma/main.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index f72f52b..65e3687 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -432,8 +432,11 @@ static int bcma_device_probe(struct device *dev)
   drv);
int err = 0;
 
+   get_device(dev);
if (adrv->probe)
err = adrv->probe(core);
+   if (err)
+   put_device(dev);
 
return err;
 }
@@ -446,6 +449,7 @@ static int bcma_device_remove(struct device *dev)
 
if (adrv->remove)
adrv->remove(core);
+   put_device(dev);
 
return 0;
 }
-- 
2.8.0.rc2.1.gbe9624a