mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dmitry Voytik <voytikd@gmail.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Brian Swetland" <swetland@google.com>,
	"Arve Hjønnevåg" <arve@android.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: binder: fix coding style issues
Date: Mon, 08 Sep 2014 06:58:04 -0700	[thread overview]
Message-ID: <1410184684.12560.11.camel@joe-AO725> (raw)
In-Reply-To: <1410183467-13504-1-git-send-email-voytikd@gmail.com>

On Mon, 2014-09-08 at 17:37 +0400, Dmitry Voytik wrote:
> Fix coding style issues:
> * put braces in all if-else branches;
> * limit the length of changed lines to 80 columns.
> checkpatch.pl warning count reduces by 3.
[]
> diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
[]
> @@ -2198,12 +2198,16 @@ retry:
>  		struct binder_work *w;
>  		struct binder_transaction *t = NULL;
>  
> -		if (!list_empty(&thread->todo))
> -			w = list_first_entry(&thread->todo, struct binder_work, entry);
> -		else if (!list_empty(&proc->todo) && wait_for_proc_work)
> -			w = list_first_entry(&proc->todo, struct binder_work, entry);
> -		else {
> -			if (ptr - buffer == 4 && !(thread->looper & BINDER_LOOPER_STATE_NEED_RETURN)) /* no data added */
> +		if (!list_empty(&thread->todo)) {
> +			w = list_first_entry(&thread->todo, struct binder_work,
> +						entry);
> +		} else if (!list_empty(&proc->todo) && wait_for_proc_work) {
> +			w = list_first_entry(&proc->todo, struct binder_work,
> +						entry);

Please indent multi line statements to the
appropriate open parenthesis using maximal
initial tabs and few spaces as required.

Here it would use 5 tabs, then 6 spaces.

			w =  list_first_entry(&proc->todo, struct binder_work,
					      entry);
> +		} else {
> +			/* no data added */
> +			if (ptr - buffer == 4 && !(thread->looper &
> +					BINDER_LOOPER_STATE_NEED_RETURN))

better as
			if (ptr - buffer == 4 &&
			    !(thread->looper & BINDER_LOOPER_STATE_NEED_RETURN))



  reply	other threads:[~2014-09-08 13:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 13:37 Dmitry Voytik
2014-09-08 13:58 ` Joe Perches [this message]
2014-09-08 14:16   ` Dmitry Voytik
2014-09-08 15:41     ` Joe Perches
2014-09-08 18:45       ` Dmitry Voytik

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=1410184684.12560.11.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=arve@android.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swetland@google.com \
    --cc=voytikd@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 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®