linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
	Yangtao Li <tiny.windzz@gmail.com>,
	myungjoo.ham@samsung.com, kyungmin.park@samsung.com,
	linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] PM / devfreq: fix indentation in devfreq_add_device()
Date: Mon, 21 Jan 2019 08:39:20 -0800	[thread overview]
Message-ID: <a6b96055a16da89a3cc20c145b65beb61c55f0a1.camel@perches.com> (raw)
In-Reply-To: <e45d38da-1dc4-c1ca-83d4-0efeb64acef1@samsung.com>

On Mon, 2019-01-21 at 10:58 +0900, Chanwoo Choi wrote:
> On 19. 1. 20. 오전 1:04, Yangtao Li wrote:
> > To beautify the code format.

I believe half of the changes are actually _less_ beautiful.

> > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
[]
> > @@ -683,16 +683,15 @@ struct devfreq *devfreq_add_device(struct device *dev,
> >  		goto err_out;
> >  	}
> >  
> > -	devfreq->trans_table =
> > -		devm_kzalloc(&devfreq->dev,
> > -			     array3_size(sizeof(unsigned int),
> > -					 devfreq->profile->max_state,
> > -					 devfreq->profile->max_state),
> > -			     GFP_KERNEL);
> > +	devfreq->trans_table = devm_kzalloc(&devfreq->dev,
> > +					    array3_size(sizeof(unsigned int),
> > +					    devfreq->profile->max_state,
> > +					    devfreq->profile->max_state),
> > +					    GFP_KERNEL);

I think this bit is worse because the array3_size arguments
are no longer aligned.

> >  	devfreq->time_in_state = devm_kcalloc(&devfreq->dev,
> > -						devfreq->profile->max_state,
> > -						sizeof(unsigned long),
> > -						GFP_KERNEL);
> > +					      devfreq->profile->max_state,
> > +					      sizeof(unsigned long),
> > +					      GFP_KERNEL);

and this bit is better.



      reply	other threads:[~2019-01-21 16:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190119183407epcas1p4958e4526d07c36605307c49b0c0e2e2c@epcas1p4.samsung.com>
2019-01-19 16:04 ` [PATCH 1/3] PM / devfreq: fix indentation in devfreq_add_device() Yangtao Li
2019-01-19 16:04   ` [PATCH 2/3] PM / devfreq: fix missing check of return value " Yangtao Li
2019-01-19 16:04   ` [PATCH 3/3] PM / devfreq: fix mem leak " Yangtao Li
2019-01-21  1:42     ` Chanwoo Choi
     [not found]   ` <CGME20190119183505epcas1p15efda0795b3c94601bcb2f442ab15232@epcms1p5>
2019-01-21  1:23     ` MyungJoo Ham
     [not found]   ` <CGME20190119183509epcas1p27012fefeafe539c3f82030caf85ad308@epcms1p1>
2019-01-21  1:27     ` [PATCH 2/3] PM / devfreq: fix missing check of return value " MyungJoo Ham
2019-01-21  1:58   ` [PATCH 1/3] PM / devfreq: fix indentation " Chanwoo Choi
2019-01-21 16:39     ` Joe Perches [this message]

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=a6b96055a16da89a3cc20c145b65beb61c55f0a1.camel@perches.com \
    --to=joe@perches.com \
    --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=tiny.windzz@gmail.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;
as well as URLs for NNTP newsgroup(s).