lkml.org 
[lkml]   [2019]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Staging: greybus: usb: Fixed a coding style error
From
Date
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.


\
 
 \ /
  Last update: 2019-03-31 08:06    [W:0.054 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site