mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Joe Perches <joe@perches.com>,
	Cristian Sicilia <sicilia.cristian@gmail.com>,
	Vaibhav Hiremath <hvaibhav.linux@gmail.com>,
	Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Vaibhav Agarwal <vaibhav.sr@gmail.com>,
	Mark Greer <mgreer@animalcreek.com>,
	Rui Miguel Silva <rmfrfs@gmail.com>, David Lin <dtwlin@gmail.com>
Cc: Viresh Kumar <vireshk@kernel.org>,
	Bryan O'Donoghue <pure.logic@nexus-software.ie>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: Parenthesis alignment
Date: Wed, 21 Nov 2018 15:58:53 +1100	[thread overview]
Message-ID: <87zhu3auwi.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <0d630c2b5d234eb4131b8021b345edbf080b2c52.camel@perches.com>

[-- Attachment #1: Type: text/plain, Size: 1678 bytes --]

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);

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

Thanks,
NeilBrown


>
> But if you are going to do this for multiple line
> statements, please fix all the line continuations of
> the statement, not just the first.
>
>>  		if (ret) {
>>  			dev_err_ratelimited(module->dev,
>> @@ -160,7 +160,7 @@ static int gbaudio_module_disable_tx(struct gbaudio_module_info *module, int id)
>>  		i2s_port = 0;	/* fixed for now */
>>  		cportid = data->connection->hd_cport_id;
>>  		ret = gb_audio_apbridgea_unregister_cport(data->connection,
>> -						i2s_port, cportid,
>> +							  i2s_port, cportid,
>>  						AUDIO_APBRIDGEA_DIRECTION_TX);
>
> etc...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-11-21  4:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-18 19:28 Cristian Sicilia
2018-11-18 19:42 ` Joe Perches
2018-11-21  4:58   ` NeilBrown [this message]
2018-11-21 10:11     ` Joe Perches
2018-11-20  9:43 ` Greg Kroah-Hartman
     [not found]   ` <CACU=YuXesdrT2keMHe33fHRiq0PPKwcQMnp6fGCXgCTbz-kmQw@mail.gmail.com>
2018-11-21  6:09     ` Greg Kroah-Hartman
2018-11-25 16:58 Cristian Sicilia

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=87zhu3auwi.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=dtwlin@gmail.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hvaibhav.linux@gmail.com \
    --cc=joe@perches.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgreer@animalcreek.com \
    --cc=pure.logic@nexus-software.ie \
    --cc=rmfrfs@gmail.com \
    --cc=sicilia.cristian@gmail.com \
    --cc=vaibhav.sr@gmail.com \
    --cc=vireshk@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®