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 19:59:26 -0800 [thread overview]
Message-ID: <20170310035925.GA17657@d830.WORKGROUP> (raw)
In-Reply-To: <alpine.DEB.2.20.1703092211302.2306@hadrien>
On Thu, Mar 09, 2017 at 10:13:58PM +0100, Julia Lawall wrote:
>
>
> On Thu, 9 Mar 2017, Alison Schofield wrote:
>
> > 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
Agreed w Julia about focusing, but then wrote the file name instead
of the function name. Should be: clean up function wilc_spi_read_int()
alisons
> >
> > 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.
>
> As a general rule, I think it could be a good idea to try to make smaller
> patchsets. Focus on one thing and try to do a good job of it (proper
> subject line, helpful and comprehensive commit message, correct changes)
> rather than trying to do everything to clean up a file at once. It's
> always possible to do the rest later.
>
> julia
>
> >
> > alisons
> >
> > >>>>>>>>>>>>>>>>>>> snipped a whole lot of stuff <<<<<<<<<<<<<<<<<
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170309210619.GA9289%40d830.WORKGROUP.
> > For more options, visit https://groups.google.com/d/optout.
> >
prev parent reply other threads:[~2017-03-10 3:59 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
2017-03-09 21:13 ` Julia Lawall
2017-03-10 3:59 ` Alison Schofield [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=20170310035925.GA17657@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.