linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] devfreq: fix double call put_device
@ 2016-05-14  5:45 Caizhiyong
  0 siblings, 0 replies; 4+ messages in thread
From: Caizhiyong @ 2016-05-14  5:45 UTC (permalink / raw)
  To: Andrew Morton, linux-pm, kyungmin.park, myungjoo.ham, lkml
  Cc: Wanli (welly), Quyaxin, Wangming (Wonder)

From: Cai Zhiyong <caizhiyong@huawei.com>
Date: Sat, 14 May 2016 14:13:30 +0800
Subject: [PATCH] devfreq: fix double call put_device

1295  */
1296 void device_unregister(struct device *dev)
1297 {
1298         pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
1299         device_del(dev);
1300         put_device(dev);
1301 }
1302 EXPORT_SYMBOL_GPL(device_unregister);
1303

device_unregister is called put_device, there is no need to call
put_device(&devfreq->dev) again.

Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com>
---
 drivers/devfreq/devfreq.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 1d6c803..8de22c0 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -621,7 +621,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
 		return -EINVAL;
 
 	device_unregister(&devfreq->dev);
-	put_device(&devfreq->dev);
 
 	return 0;
 }
-- 
1.7.9.5

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

* Re: [PATCH] devfreq: fix double call put_device
  2016-05-18 11:07 ` Chanwoo Choi
@ 2016-06-01 11:31   ` Chanwoo Choi
  0 siblings, 0 replies; 4+ messages in thread
From: Chanwoo Choi @ 2016-06-01 11:31 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: Caizhiyong, Andrew Morton, linux-pm, kyungmin.park, myungjoo.ham,
	lkml, Wanli (welly), Wangming (Wonder),
	Quyaxin

Dear Myungjoo,

I reivewed this patch. But the merged patch[1] don't include the my
reviewed-by tag.

[1] https://git.kernel.org/cgit/linux/kernel/git/mzx/devfreq.git/commit/?h=fixes&id=d90ea94c8f33dcda631885a3dbb2df063ba39efd

Regards,
Chanwoo Choi

On Wed, May 18, 2016 at 8:07 PM, Chanwoo Choi <cw00.choi@samsung.com> wrote:
> Hi Cai,
>
> On 2016년 05월 14일 15:28, Caizhiyong wrote:
>> From: Cai Zhiyong <caizhiyong@huawei.com>
>> Date: Sat, 14 May 2016 14:13:30 +0800
>> Subject: [PATCH] devfreq: fix double call put_device
>
> The patch description don't need to include the 'Date/Subject'.
> You need to delete them.
>
>>
>> 1295  */
>> 1296 void device_unregister(struct device *dev)
>> 1297 {
>> 1298         pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
>> 1299         device_del(dev);
>> 1300         put_device(dev);
>> 1301 }
>> 1302 EXPORT_SYMBOL_GPL(device_unregister);
>> 1303
>
> Also, you don't need to include the source code of device_unregister()
> because below description explains the why this patch is needed.
>
>>
>> device_unregister is called put_device, there is no need to call
>> put_device(&devfreq->dev) again.
>>
>> Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com>
>> ---
>>  drivers/devfreq/devfreq.c |    1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>> index 1d6c803..8de22c0 100644
>> --- a/drivers/devfreq/devfreq.c
>> +++ b/drivers/devfreq/devfreq.c
>> @@ -621,7 +621,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
>>               return -EINVAL;
>>
>>       device_unregister(&devfreq->dev);
>> -     put_device(&devfreq->dev);
>>
>>       return 0;
>>  }
>>
>
> If you modify the patch description, Looks good to me.
>
> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
>
> Thanks,
> Chanwoo Choi

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

* Re: [PATCH] devfreq: fix double call put_device
  2016-05-14  6:28 Caizhiyong
@ 2016-05-18 11:07 ` Chanwoo Choi
  2016-06-01 11:31   ` Chanwoo Choi
  0 siblings, 1 reply; 4+ messages in thread
From: Chanwoo Choi @ 2016-05-18 11:07 UTC (permalink / raw)
  To: Caizhiyong, Andrew Morton, linux-pm, kyungmin.park, myungjoo.ham, lkml
  Cc: Wanli (welly), Wangming (Wonder), Quyaxin

Hi Cai,

On 2016년 05월 14일 15:28, Caizhiyong wrote:
> From: Cai Zhiyong <caizhiyong@huawei.com>
> Date: Sat, 14 May 2016 14:13:30 +0800
> Subject: [PATCH] devfreq: fix double call put_device

The patch description don't need to include the 'Date/Subject'.
You need to delete them.

> 
> 1295  */
> 1296 void device_unregister(struct device *dev)
> 1297 {
> 1298         pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
> 1299         device_del(dev);
> 1300         put_device(dev);
> 1301 }
> 1302 EXPORT_SYMBOL_GPL(device_unregister);
> 1303

Also, you don't need to include the source code of device_unregister()
because below description explains the why this patch is needed.

> 
> device_unregister is called put_device, there is no need to call
> put_device(&devfreq->dev) again.
> 
> Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com>
> ---
>  drivers/devfreq/devfreq.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 1d6c803..8de22c0 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -621,7 +621,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
>  		return -EINVAL;
>  
>  	device_unregister(&devfreq->dev);
> -	put_device(&devfreq->dev);
>  
>  	return 0;
>  }
> 

If you modify the patch description, Looks good to me.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

Thanks,
Chanwoo Choi

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

* [PATCH] devfreq: fix double call put_device
@ 2016-05-14  6:28 Caizhiyong
  2016-05-18 11:07 ` Chanwoo Choi
  0 siblings, 1 reply; 4+ messages in thread
From: Caizhiyong @ 2016-05-14  6:28 UTC (permalink / raw)
  To: Andrew Morton, linux-pm, kyungmin.park, myungjoo.ham, lkml
  Cc: Wanli (welly), Wangming (Wonder), Quyaxin

From: Cai Zhiyong <caizhiyong@huawei.com>
Date: Sat, 14 May 2016 14:13:30 +0800
Subject: [PATCH] devfreq: fix double call put_device

1295  */
1296 void device_unregister(struct device *dev)
1297 {
1298         pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
1299         device_del(dev);
1300         put_device(dev);
1301 }
1302 EXPORT_SYMBOL_GPL(device_unregister);
1303

device_unregister is called put_device, there is no need to call
put_device(&devfreq->dev) again.

Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com>
---
 drivers/devfreq/devfreq.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 1d6c803..8de22c0 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -621,7 +621,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
 		return -EINVAL;
 
 	device_unregister(&devfreq->dev);
-	put_device(&devfreq->dev);
 
 	return 0;
 }
-- 
1.7.9.5

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

end of thread, other threads:[~2016-06-01 11:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-14  5:45 [PATCH] devfreq: fix double call put_device Caizhiyong
2016-05-14  6:28 Caizhiyong
2016-05-18 11:07 ` Chanwoo Choi
2016-06-01 11:31   ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).