All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Frans Klaver <fransklaver@gmail.com>
Cc: Mitchell Tasman <tasman@leaflabs.com>,
	driverdevel <devel@driverdev.osuosl.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Johan Hovold <johan@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	greybus-dev@lists.linaro.org
Subject: Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines
Date: Mon, 10 Jul 2017 22:24:24 -0700	[thread overview]
Message-ID: <1499750664.4457.5.camel@perches.com> (raw)
In-Reply-To: <20170710093112.GI2928@vireshk-i7>

On Mon, 2017-07-10 at 15:01 +0530, Viresh Kumar wrote:
> On 10-07-17, 11:30, Frans Klaver wrote:
> > On Mon, Jul 10, 2017 at 6:46 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > Hi Mitchell,
> > > 
> > > On 09-07-17, 20:25, Mitchell Tasman wrote:
> > > > Adjust formatting of various statements to keep line length within
> > > > the 80 column limit preferred by the Linux kernel coding style.
> > > 
> > > We try to follow that most of the time, but the end result should be easily
> > > readable.  If it isn't, then we just ignore the rule.
> > > 
> > > > Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
> > > > ---
> > > > Changes in v2: Add back a missing space in a comment
> > > > 
> > > >  drivers/staging/greybus/arche-platform.c | 29 +++++++++++++++++++----------
> > > >  1 file changed, 19 insertions(+), 10 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> > > > index eced2d2..eedd239 100644
> > > > --- a/drivers/staging/greybus/arche-platform.c
> > > > +++ b/drivers/staging/greybus/arche-platform.c
> > > > @@ -172,15 +172,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
> > > >               if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) {
> > > >                       if (time_before(jiffies,
> > > >                                       arche_pdata->wake_detect_start +
> > > > -                                     msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
> > > > -                             arche_platform_set_wake_detect_state(arche_pdata,
> > > > -                                                                  WD_STATE_IDLE);
> > > > +                                     msecs_to_jiffies(
> > > > +                                             WD_COLDBOOT_PULSE_WIDTH_MS))) {
> > > > +                             arche_platform_set_wake_detect_state(
> > > 
> > > We don't break the lines like this in kernel to satisfy the 80 column width
> > > rule. Surely, some places would have similar code, but in general this isn't
> > > recommended. And that's why we never bothered about 80 column rule in this and
> > > below cases.
> > 
> > In cases like this, one could argue that you should start looking at
> > the level of indentation, rather than the line length per se. After
> > all, the documentation states that "if you need more than 3 levels of
> > indentation, you're screwed anyway, and you should fix your program".
> 
> And I completely agree to that :)

Another thing to consider is to s/arche_platform_//
as the identifier lengths are just way too long.

  reply	other threads:[~2017-07-11  5:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09 21:28 [PATCH] staging: greybus: arche: wrap over-length lines Mitchell Tasman
2017-07-10  0:25 ` [PATCH v2] " Mitchell Tasman
2017-07-10  4:46   ` [greybus-dev] " Viresh Kumar
2017-07-10  9:30     ` Frans Klaver
2017-07-10  9:31       ` Viresh Kumar
2017-07-11  5:24         ` Joe Perches [this message]
2017-07-11  3:14     ` [PATCH v3] " Mitchell Tasman
2017-07-11  3:22       ` [greybus-dev] " Viresh Kumar

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=1499750664.4457.5.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=fransklaver@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tasman@leaflabs.com \
    --cc=viresh.kumar@linaro.org \
    /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.