staging: binder: fix coding style issues
PATCH 1/1 staging: binder: fix coding style issues
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.
--- drivers/staging/android/binder.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/staging/android/binder.c +10 -6
@@ -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); + }else { +/* no data added */ +if (ptr - buffer ==4 && !(thread->looper & +BINDER_LOOPER_STATE_NEED_RETURN )) goto retry;break ; }
Signature · 1 line
1.9.1
Quoted 4 lines · Dmitry Voytik
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.
[]
drivers/staging/android/binder.c
Quoted 1 line
drivers/staging/android/binder.c +0
-0
[]
Quoted 6 lines
drivers/staging/android/binder.c +0
-2@@ -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);
drivers/staging/android/binder.c retry: · line 2206
Quoted 10 lines
drivers/staging/android/binder.c +6
-4-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);
drivers/staging/android/binder.c retry: · line 2210
Quoted 4 lines
drivers/staging/android/binder.c +4
-0+ }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))
PATCH 1/1 staging: binder: fix coding style issues
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.
--- drivers/staging/android/binder.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/staging/android/binder.c +10 -6
@@ -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); + }else { +/* no data added */ +if (ptr - buffer ==4 && + !(thread->looper &BINDER_LOOPER_STATE_NEED_RETURN )) goto retry;break ; }
Signature · 1 line
1.9.1
Quoted 7 lines · Dmitry Voytik
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.Signed-off-by Dmitry Voytik <[email protected]>Reviewed-by Joe Perches <[email protected]>
Hi Dmitry.
I don't see any defect in your patch now but here's a bit of trivia for you.
I didn't sign anything here.
Please don't add signatures from another person unless or until specifically written by that other person.
cheers, Joe
Quoted 11 lines · Joe Perches
Quoted 7 lines · Dmitry Voytik
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.Signed-off-by Dmitry Voytik <[email protected]>Reviewed-by Joe Perches <[email protected]>Hi Dmitry.
Quoted 7 lines
I don't see any defect in your patch now but here's a bit of trivia for you.
I didn't sign anything here.
Please don't add signatures from another person unless or until specifically written by that other person.
Oops. Sorry about that.
Thank you for the review and guiding!
Quoted 2 lines
cheers, Joe
Signature · 3 lines
Best Regards, Dmitry Voytik. [email protected]