All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Ioana Ciornei <ciorneiioana@gmail.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
	Daniel Baluta <daniel.baluta@gmail.com>,
	outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] [PATCH v3 2/9] staging: iio: adc: properly indent to match open paranthesis
Date: Tue, 13 Oct 2015 17:21:01 +0530	[thread overview]
Message-ID: <20151013115101.GA8378@sudip-pc> (raw)
In-Reply-To: <CAHWJYFnB=o_UYGcT=B4LYZ+jwcERBsHDSc1_dJ=n+kaTBkgSiw@mail.gmail.com>

On Tue, Oct 13, 2015 at 01:05:58PM +0300, Ioana Ciornei wrote:
> On Tue, Oct 13, 2015 at 12:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> > On Tue, 13 Oct 2015, Ioana Ciornei wrote:
> >
> >> On Mon, Oct 12, 2015 at 6:14 PM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
> >> >
> >> > On Fri, Oct 9, 2015 at 10:51 PM, Ioana Ciornei <ciorneiioana@gmail.com> wrote:
> >> > > Indent parameters and arguments passed to function calls to match
> >> > > open paranthesis
> >> > >
> >> > > Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
> >> > > ---
> >> > > Changes in v2:
> >> > >     - nothing
> >> > > Changes in v3:
> >> > >     - rework changes in order to avoid introducing new checkpatch warnings
> >> > >
> >> >
> >> > <snip>
> >> >
> >> > > @@ -565,10 +565,11 @@ static int ad7280_attr_init(struct ad7280_state *st)
> >> > >                         st->iio_attr[cnt].dev_attr.store =
> >> > >                                 ad7280_store_balance_sw;
> >> > >                         st->iio_attr[cnt].dev_attr.attr.name =
> >> > > -                               kasprintf(GFP_KERNEL,
> >> >
> >> > This line looks good to me as it is. Is there any particular reason
> >> > for which you we want GFP_KERNEL to be moved on the next line?
> >> >
> >>
> >> I chose to move kasprintf on the next line and all the others
> >> arguments also in order to improve readability.
> >> I had to choose between leaving the kasprintf where it was and
> >> properly align the arguments to match the open bracket but
> >> cross the 80 char limit or moving the kasprintf call on the next line
> >> so the arguments are somewhat distinguishable.
> >>
> >> Was this a bad call?
> >
> > It's not really normal to see the first argument on a different line.
> > Do the other arguments not fit if they are lines up with the right side of
> > the (?  Perhaps it is possible to break up the longer arguments more so
> > that they fit better?
> >
> 
> The first argument fits, the problem is with the other ones.
> Well, now that I think of... yes there is a solution to this.
> If use a variable instead of 'dev * AD7280A_CELLS_PER_DEV + ch' all
> the problems would be solved.
> 
> Is this a proper way to handle it?

Today morning Greg said in a review of one patch "No need to create a
whole new variable when you only use it once."

reference at: https://lkml.org/lkml/2015/10/13/27

regards
sudip


  parent reply	other threads:[~2015-10-13 11:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 19:50 [PATCH v3 0/9] staging: iio: adc: fix multiple checkpatch issues Ioana Ciornei
2015-10-09 19:51 ` [PATCH v3 1/9] staging: iio: adc: use kernel types u32 and u64 Ioana Ciornei
2015-10-12 16:59   ` [Outreachy kernel] " Daniel Baluta
2015-10-09 19:51 ` [PATCH v3 2/9] staging: iio: adc: properly indent to match open paranthesis Ioana Ciornei
2015-10-12 15:14   ` [Outreachy kernel] " Daniel Baluta
2015-10-13  9:52     ` Ioana Ciornei
2015-10-13  9:56       ` Julia Lawall
2015-10-13 10:05         ` Ioana Ciornei
2015-10-13 10:19           ` Julia Lawall
2015-10-13 11:51           ` Sudip Mukherjee [this message]
2015-10-13 11:52             ` Julia Lawall
2015-10-13 11:54           ` Daniel Baluta
2015-10-09 19:51 ` [PATCH v3 3/9] staging: iio: adc: remove explicit comparison to NULL Ioana Ciornei
2015-10-12 16:26   ` [Outreachy kernel] " Daniel Baluta
2015-10-09 19:51 ` [PATCH v3 4/9] staging: iio: adc: remove space after cast Ioana Ciornei
2015-10-12 16:31   ` [Outreachy kernel] " Daniel Baluta
2015-10-09 19:51 ` [PATCH v3 5/9] staging: iio: adc: add spaces around binary operators Ioana Ciornei
2015-10-12 16:38   ` [Outreachy kernel] " Daniel Baluta
2015-10-12 19:00     ` Ioana Ciornei
2015-10-13  0:01       ` Greg KH
2015-10-13  5:47         ` Ioana Ciornei
2015-10-09 19:51 ` [PATCH v3 6/9] staging: iio: adc: add blank line after declarations Ioana Ciornei
2015-10-12 16:39   ` [Outreachy kernel] " Daniel Baluta
2015-10-09 19:51 ` [PATCH v3 7/9] staging: iio: adc: remove multiple blank lines Ioana Ciornei
2015-10-12 16:40   ` [Outreachy kernel] " Daniel Baluta
2015-10-09 19:51 ` [PATCH v3 8/9] staging: iio: adc: remove the use of CamelCase Ioana Ciornei
2015-10-12 16:50   ` [Outreachy kernel] " Daniel Baluta
2015-10-09 19:51 ` [PATCH v3 9/9] staging: iio: adc: properly indent block comments Ioana Ciornei
2015-10-12 16:53   ` [Outreachy kernel] " Daniel Baluta

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=20151013115101.GA8378@sudip-pc \
    --to=sudipm.mukherjee@gmail.com \
    --cc=ciorneiioana@gmail.com \
    --cc=daniel.baluta@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.