* [PATCH] staging: binder: fix coding style issues
@ 2014-09-08 13:37 Dmitry Voytik
2014-09-08 13:58 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Voytik @ 2014-09-08 13:37 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Brian Swetland, Arve Hjønnevåg, linux-kernel, 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 <voytikd@gmail.com>
---
drivers/staging/android/binder.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 4f34dc0..b7d6b3a 100644
--- 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);
+ } else {
+ /* no data added */
+ if (ptr - buffer == 4 && !(thread->looper &
+ BINDER_LOOPER_STATE_NEED_RETURN))
goto retry;
break;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: binder: fix coding style issues
2014-09-08 13:37 [PATCH] staging: binder: fix coding style issues Dmitry Voytik
@ 2014-09-08 13:58 ` Joe Perches
2014-09-08 14:16 ` Dmitry Voytik
0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2014-09-08 13:58 UTC (permalink / raw)
To: Dmitry Voytik
Cc: Greg Kroah-Hartman, Brian Swetland, Arve Hjønnevåg,
linux-kernel
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))
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] staging: binder: fix coding style issues
2014-09-08 13:58 ` Joe Perches
@ 2014-09-08 14:16 ` Dmitry Voytik
2014-09-08 15:41 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Voytik @ 2014-09-08 14:16 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Joe Perches, Brian Swetland, Arve Hjønnevåg,
linux-kernel, 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 <voytikd@gmail.com>
Reviewed-by: Joe Perches <joe@perches.com>
---
drivers/staging/android/binder.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 4f34dc0..4f1a6f7 100644
--- 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);
+ } else {
+ /* no data added */
+ if (ptr - buffer == 4 &&
+ !(thread->looper & BINDER_LOOPER_STATE_NEED_RETURN))
goto retry;
break;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: binder: fix coding style issues
2014-09-08 14:16 ` Dmitry Voytik
@ 2014-09-08 15:41 ` Joe Perches
2014-09-08 18:45 ` Dmitry Voytik
0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2014-09-08 15:41 UTC (permalink / raw)
To: Dmitry Voytik
Cc: Greg Kroah-Hartman, Brian Swetland, Arve Hjønnevåg,
linux-kernel
On Mon, 2014-09-08 at 18:16 +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.
>
> Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
> Reviewed-by: Joe Perches <joe@perches.com>
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: binder: fix coding style issues
2014-09-08 15:41 ` Joe Perches
@ 2014-09-08 18:45 ` Dmitry Voytik
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Voytik @ 2014-09-08 18:45 UTC (permalink / raw)
To: Joe Perches
Cc: Greg Kroah-Hartman, Brian Swetland, Arve Hjønnevåg,
linux-kernel
On Mon, Sep 8, 2014 at 7:41 PM, Joe Perches <joe@perches.com> wrote:
> On Mon, 2014-09-08 at 18:16 +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.
>>
>> Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
>> Reviewed-by: Joe Perches <joe@perches.com>
>
> 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.
Oops. Sorry about that.
Thank you for the review and guiding!
> cheers, Joe
>
--
Best Regards,
Dmitry Voytik.
voytikd@gmail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-08 18:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 13:37 [PATCH] staging: binder: fix coding style issues Dmitry Voytik
2014-09-08 13:58 ` Joe Perches
2014-09-08 14:16 ` Dmitry Voytik
2014-09-08 15:41 ` Joe Perches
2014-09-08 18:45 ` Dmitry Voytik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.