All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] staging:vc04_services:bcm2835-camera:controls.c: Fix multiple line dereference
Date: Mon, 19 Mar 2018 16:47:06 +0100	[thread overview]
Message-ID: <20180319154706.GA29719@kroah.com> (raw)
In-Reply-To: <CAC4++KDB7K4Lfn0Edp+g9gF3TzARZUuuagaMaJquEeTLmo_Q8A@mail.gmail.com>

On Mon, Mar 19, 2018 at 09:04:59PM +0530, Nishka Dasgupta wrote:
> On Mon, Mar 19, 2018 at 9:00 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > A: Because it messes up the order in which people normally read text.
> > Q: Why is top-posting such a bad thing?
> > A: Top-posting.
> > Q: What is the most annoying thing in e-mail?
> 
> Will remember not to top post in future emails.
> 
> > A: No.
> > Q: Should I include quotations after my reply?
> >
> > http://daringfireball.net/2007/07/on_top
> >
> > On Mon, Mar 19, 2018 at 08:54:11PM +0530, Nishka Dasgupta wrote:
> >> The reference (in this and other patches of the same type) is of the
> >> form dev->component[something]->output[something else]. Because of the
> >> line limit, this tended to be split over multiple lines even though
> >> it's technically (as far as I can tell) a single argument. Such
> >> splitting may have the effect of making the code harder to follow
> >> (since we now have to mentally assemble the same value from multiple
> >> lines of code).
> >> By condensing the parts within the square brackets to 3 or 4
> >> characters, I could fit the entire variable in a single line without
> >> violating the 80 character limit.
> >
> > Yeah, but you "waste" two new variables for this, and force the reader
> > to have to go backwards to try to understand what exactly the array
> > values are, and be confused as to why they never change.
> >
> > If you don't like the statement, it can be all put on one line, and
> > ignore the 80 column rule here.  Or better yet, just indent things a bit
> > to keep it all on one line, or use a temp variable for the pointer
> > value.
> 
> Is it advisable to ignore the 80-column rule for a change like this?
> Because this is something that comes up in at least 10 more places in
> another file in the same driver, so I was wondering whether to ignore
> all of them, or break the 80-column limit for every such line. Which
> should I do?

That is up to you, use your best judgement here.

good luck!

greg k-h


      reply	other threads:[~2018-03-19 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 14:07 [PATCH] staging:vc04_services:bcm2835-camera:controls.c: Fix multiple line dereference Nishka Dasgupta
2018-03-19 14:12 ` Greg KH
2018-03-19 15:24   ` Nishka Dasgupta
2018-03-19 15:30     ` Greg KH
2018-03-19 15:34       ` Nishka Dasgupta
2018-03-19 15:47         ` Greg KH [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=20180319154706.GA29719@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=nishka.dasgupta_ug18@ashoka.edu.in \
    --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.