All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Will Cunningham <wjcunningham7@gmail.com>, johan@kernel.org
Cc: elder@kernel.org, gregkh@linuxfoundation.org,
	greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: greybus: usb: Fixed a coding style error
Date: Sat, 30 Mar 2019 23:04:59 -0700	[thread overview]
Message-ID: <41750e16d14a967529d7cb5e315110ee5ccd313c.camel@perches.com> (raw)
In-Reply-To: <20190331053040.GA12974@titus.pi.local>

On Sun, 2019-03-31 at 01:30 -0400, Will Cunningham wrote:
> Line was >80 characters.
[]
> diff --git a/drivers/staging/greybus/usb.c b/drivers/staging/greybus/usb.c
[]
> @@ -169,8 +169,8 @@ static int gb_usb_probe(struct gbphy_device *gbphy_dev,
>  		return -ENOMEM;
>  
>  	connection = gb_connection_create(gbphy_dev->bundle,
> -					  le16_to_cpu(gbphy_dev->cport_desc->id),
> -					  NULL);
> +				le16_to_cpu(gbphy_dev->cport_desc->id),
> +				NULL);

Blind adherence to 80 column limits leads to poor looking
code.  Especially with longish identifier lengths.

Another way to do this, which is not necessarily actually
better is to position the left side of the assignment on a
separate line like:

	connection =
		 gb_connection_create(gbphy_dev->bundle,
				      le16_to_cpu(gbphy_dev->cport_desc->id),

Is that better?  <shrug>  I prefer the original.
It was better before as it was aligned to open parenthesis.



  reply	other threads:[~2019-03-31  6:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-31  5:30 [PATCH] Staging: greybus: usb: Fixed a coding style error Will Cunningham
2019-03-31  6:04 ` Joe Perches [this message]
2019-03-31  6:20   ` [greybus-dev] " Alex Elder
2019-03-31  6:40     ` Joe Perches
2019-03-31  6:43       ` Alex Elder
2019-04-15 12:42 ` Johan Hovold

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=41750e16d14a967529d7cb5e315110ee5ccd313c.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wjcunningham7@gmail.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.