lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 21 Nov 2018 02:11:00 -0800
From:   Joe Perches <joe@...ches.com>
To:     NeilBrown <neilb@...e.com>,
        Cristian Sicilia <sicilia.cristian@...il.com>,
        Vaibhav Hiremath <hvaibhav.linux@...il.com>,
        Johan Hovold <johan@...nel.org>, Alex Elder <elder@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Vaibhav Agarwal <vaibhav.sr@...il.com>,
        Mark Greer <mgreer@...malcreek.com>,
        Rui Miguel Silva <rmfrfs@...il.com>,
        David Lin <dtwlin@...il.com>
Cc:     Viresh Kumar <vireshk@...nel.org>,
        Bryan O'Donoghue <pure.logic@...us-software.ie>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: greybus: Parenthesis alignment

On Wed, 2018-11-21 at 15:58 +1100, NeilBrown wrote:
> On Sun, Nov 18 2018, Joe Perches wrote:
> 
> > On Sun, 2018-11-18 at 20:28 +0100, Cristian Sicilia wrote:
> > > Some parameters are aligned with parentheses.
> > > Some parentheses are opened at end of line.
> > 
> > Given the very long identifier lengths, I wouldn't
> > consider many of these appropriate.
> > 
> > 80 column line lengths and long identifiers don't
> > play well together.
> > 
> > > diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
> > 
> > []
> > > @@ -70,7 +70,7 @@ static int gbaudio_module_enable_tx(struct gbaudio_codec_info *codec,
> > >  		i2s_port = 0;	/* fixed for now */
> > >  		cportid = data->connection->hd_cport_id;
> > >  		ret = gb_audio_apbridgea_register_cport(data->connection,
> > > -						i2s_port, cportid,
> > > +							i2s_port, cportid,
> > >  						AUDIO_APBRIDGEA_DIRECTION_TX);
> 
> My preferred formatting in this situation is
> 
>   		ret = gb_audio_apbridgea_register_cport(
>                 	data->connection,
>  			i2s_port, cportid,
> 			AUDIO_APBRIDGEA_DIRECTION_TX);

Odd mixing of spacing and tabs in your example here.

> but checkpatch doesn't like the '(' at the end of the line.
> Do you know why that is?

Generally to avoid function declarations like

static int foo(
	int bar,
	int baz)
{
	...
}

But this also is meant for function calls.

And this obviously does not work well with excessively
long identifiers where a statement or declaration could
not fit in 80 columns.

Perhaps some logic could be added to suggest use of
shorter than some specific longish identifier length.

cheers, Joe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ