linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
	myungjoo.ham@samsung.com, kyungmin.park@samsung.com
Cc: rjw@rjwysocki.net, chanwoo@kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] PM / devfreq: Fix the checkpatch warnings
Date: Thu, 24 Nov 2016 02:52:38 -0800	[thread overview]
Message-ID: <1479984758.19726.7.camel@perches.com> (raw)
In-Reply-To: <5836C4F9.2010509@samsung.com>

On Thu, 2016-11-24 at 19:46 +0900, Chanwoo Choi wrote:
> On 2016년 11월 24일 19:20, Joe Perches wrote:
> > On Thu, 2016-11-24 at 14:01 +0900, Chanwoo Choi wrote:
> > > This patch just fixes the checkpatch warnings.
> > 
> > unrelated trivia:
> > 
> > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
[]
> > > @@ -576,11 +575,13 @@ struct devfreq *devfreq_add_device(struct device *dev,
> > >  		goto err_out;
> > >  	}
> > >  
> > > -	devfreq->trans_table =	devm_kzalloc(&devfreq->dev, sizeof(unsigned int) *
> > > +	devfreq->trans_table =	devm_kzalloc(&devfreq->dev,
> > > +						sizeof(unsigned int) *
> > >  						devfreq->profile->max_state *
> > >  						devfreq->profile->max_state,
> > >  						GFP_KERNEL);
> > > -	devfreq->time_in_state = devm_kzalloc(&devfreq->dev, sizeof(unsigned long) *
> > > +	devfreq->time_in_state = devm_kzalloc(&devfreq->dev,
> > > +						sizeof(unsigned long) *
> > >  						devfreq->profile->max_state,
> > >  						GFP_KERNEL);
> > 
> > Maybe these should be devm_kcalloc calls
> 
> Why should devfreq use the devm_kcalloc?

Because these are allocating zeroed arrays of a specific size.


  reply	other threads:[~2016-11-24 10:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161124050125epcas1p466fc832e77cfe122454b8d40d0f6744e@epcas1p4.samsung.com>
2016-11-24  5:01 ` [PATCH 0/6] PM / devfreq: Modify devfreq/devfreq-event for improvement Chanwoo Choi
2016-11-24  5:01   ` [PATCH 1/6] PM / devfreq: Fix the checkpatch warnings Chanwoo Choi
2016-11-24 10:20     ` Joe Perches
2016-11-24 10:46       ` Chanwoo Choi
2016-11-24 10:52         ` Joe Perches [this message]
2016-11-24 23:37           ` Chanwoo Choi
2016-11-24  5:01   ` [PATCH 2/6] PM / devfreq: Modify the device name as devfreq[X] for sysfs Chanwoo Choi
2016-11-24  5:01   ` [PATCH 3/6] PM / devfreq: event: Simplify the sysfs name of devfreq-event device Chanwoo Choi
2016-11-24  5:01   ` [PATCH 4/6] PM / devfreq: Remove the duplicate sysfs entry for current frequency Chanwoo Choi
2016-11-24  5:01   ` [PATCH 5/6] PM / devfreq: event: exynos-ppmu: Use the regmap interface to handle the registers Chanwoo Choi
2016-11-24  5:01   ` [PATCH 6/6] PM / devfreq: event: exynos-ppmu: Add the completion log of device registration Chanwoo Choi
2016-12-15  9:56   ` [PATCH 0/6] PM / devfreq: Modify devfreq/devfreq-event for improvement Chanwoo Choi

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=1479984758.19726.7.camel@perches.com \
    --to=joe@perches.com \
    --cc=chanwoo@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).