public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Caizhiyong <caizhiyong@hisilicon.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"kyungmin.park@samsung.com" <kyungmin.park@samsung.com>,
	"myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>,
	lkml <linux-kernel@vger.kernel.org>
Cc: "Wanli (welly)" <welly.wan@hisilicon.com>,
	"Wangming (Wonder)" <mingwonder.wang@hisilicon.com>,
	Quyaxin <quyaxin@hisilicon.com>
Subject: Re: [PATCH] devfreq: fix double call put_device
Date: Wed, 18 May 2016 20:07:05 +0900	[thread overview]
Message-ID: <573C4CD9.5050200@samsung.com> (raw)
In-Reply-To: <C3050A4DBA34F345975765E43127F10F6381E593@SZXEMA512-MBS.china.huawei.com>

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

  reply	other threads:[~2016-05-18 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-14  6:28 [PATCH] devfreq: fix double call put_device Caizhiyong
2016-05-18 11:07 ` Chanwoo Choi [this message]
2016-06-01 11:31   ` Chanwoo Choi
  -- strict thread matches above, loose matches on Subject: below --
2016-05-14  5:45 Caizhiyong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=573C4CD9.5050200@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=caizhiyong@hisilicon.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingwonder.wang@hisilicon.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=quyaxin@hisilicon.com \
    --cc=welly.wan@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox