All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Schofield <amsfield22@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Tamara Diaconita <diaconitatamara@gmail.com>,
	outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 1/3] staging: wilc1000: wilc_spi: Rearrange the code
Date: Thu, 9 Mar 2017 13:06:20 -0800	[thread overview]
Message-ID: <20170309210619.GA9289@d830.WORKGROUP> (raw)
In-Reply-To: <alpine.DEB.2.20.1703092124460.2306@hadrien>

On Thu, Mar 09, 2017 at 09:27:30PM +0100, Julia Lawall wrote:
> 
> 
> On Thu, 9 Mar 2017, Alison Schofield wrote:
> 
> > On Thu, Mar 09, 2017 at 08:24:28AM +0000, Tamara Diaconita wrote:
> > > Hi,
> > > The problem with the code was when I tried to split the lines with
> > > dev_err(...). If I split them, I get errors like "missing terminating "
> > >  character" even though this character is on the next line.
> > > But if I don't split the line, I get warnings from checkpatch.pl.
> > > Is it ok if I ignore these warnings?
> >
> > Tamara,
> >
> > I looked at func wilc_spi_read_int() with the intent of changing the line
> > over 80 warning on dev_err to see your issue, but..the function is quite
> > messy.  There is excessive bracketing {} and indentation going on.
> >
> > I'm thinking we need to clean up the excessive bracketing and indentation
> > first, and then see which lines remain over 80 and deal with them.
> >
> > Julia - Can you take a look at this func and tell us if you agree that the
> > extra brackets are not a desired style?
> 
> Definitely agree.  It's OK to declare variable at eg the top of an if
> branch if that seems really necessary from a conceptual point of view.
> But they shouldn't be declared at all random places, as is done in this
> function.  It's fine to just move the variables to the top of the
> function.
> 
> Kernel goto labels also don't have _ around them.
> 
> julia
>

Tamara,

How about a patchset that only focuses on this function:

 Subject: [PATCH 0/N] staging: wilc1000: clean up wilc_spi_int.c

	where N is yet to be defined.

  Let's assume patches 1 through N will each depend on the previous.
  I'm thinking this might be a smooth way to do it.
  See what you think and adjust as works best for you.

  patch-1: declare variables at top of function
  patch-2: remove useless brackets
  patch-3: use kernel preferred indentation style

  *** see what you are left with, maybe you'll have:

  patch-4: ...something you fit with a line
  patch-5: ...spelling

  Wow  - it get's big and we're only focused on one function ;)

  Mail the patchset to yourself.  Get a clean branch and
  apply/compile each patch in sequence.  It should compile
  after each addition.

  So, we're basically abandoning the previous patchset.
  That's ok.  You can get back to those other pieces in the
  file after this patchset gets ack'd.

alisons

>>>>>>>>>>>>>>>>>>> snipped a whole lot of stuff <<<<<<<<<<<<<<<<<



  reply	other threads:[~2017-03-09 21:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 17:06 [PATCH 1/3] staging: wilc1000: wilc_spi: Rearrange the code Tamara Diaconita
2017-03-08 19:51 ` [Outreachy kernel] " Alison Schofield
2017-03-08 21:19   ` Alison Schofield
     [not found]     ` <CALks+gDqojhZqvbO3-5CGNwTKdu-JtGygvnUJoXSmtkqMLTeiw@mail.gmail.com>
     [not found]       ` <20170308213853.GA20175@d830.WORKGROUP>
     [not found]         ` <CALks+gCnyeS=or_sySwK9f1DZjt6FJPn9H+gDP_P6TGQTuJVuw@mail.gmail.com>
2017-03-09 17:04           ` Alison Schofield
2017-03-09 20:27             ` Julia Lawall
2017-03-09 21:06               ` Alison Schofield [this message]
2017-03-09 21:13                 ` Julia Lawall
2017-03-10  3:59                   ` Alison Schofield

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=20170309210619.GA9289@d830.WORKGROUP \
    --to=amsfield22@gmail.com \
    --cc=diaconitatamara@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.