staging: android: fix coding style error
PATCH 1/1 staging: android: fix coding style error
Simple style fix - 80 char limit was exceeded.
Context: eudyptula challenge (http://eudyptula-challenge.org/)
--- drivers/staging/android/sync_debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/android/sync_debug.c +2 -1
@@ -96,7 +96,8 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) sync_status_str(status));if (status <=0 ) { -struct timespec64 ts64 =ktime_to_timespec64 (pt->base.timestamp); +struct timespec64 ts64 = +ktime_to_timespec64 (pt->base.timestamp);seq_printf (s,"@%lld.%09ld" , (s64 )ts64.tv_sec, ts64.tv_nsec); }
Signature · 1 line
2.1.4
Quoted 6 lines · On Wednesday 14 January 2015 09:20:42 Patrick Boettcher wrote:
drivers/staging/android/sync_debug.c +0
-0
drivers/staging/android/sync_debug.c static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) · line 103
Quoted 9 lines
drivers/staging/android/sync_debug.c +2
-1@@ -96,7 +96,8 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) sync_status_str(status));if (status <=0 ) { -struct timespec64 ts64 =ktime_to_timespec64 (pt->base.timestamp); +struct timespec64 ts64 = +ktime_to_timespec64 (pt->base.timestamp);seq_printf (s,"@%lld.%09ld" , (s64 )ts64.tv_sec, ts64.tv_nsec); }
You are not really improving readability by just wrapping the line arbitrarily though.
If you're offended by the long line, better rework the code so the long line is not needed.
Arnd
Quoted 2 lines · Arnd Bergmann
drivers/staging/android/sync_debug.c
Quoted 1 line · On Wednesday 14 January 2015 09:20:42 Patrick Boettcher wrote:
drivers/staging/android/sync_debug.c +0
-0
[]
Quoted 15 lines
drivers/staging/android/sync_debug.c static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) · line 103
Quoted 11 lines
drivers/staging/android/sync_debug.c +2
-1@@ -96,7 +96,8 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) sync_status_str(status));if (status <=0 ) { -struct timespec64 ts64 =ktime_to_timespec64 (pt->base.timestamp); +struct timespec64 ts64 = +ktime_to_timespec64 (pt->base.timestamp);seq_printf (s,"@%lld.%09ld" , (s64 )ts64.tv_sec, ts64.tv_nsec); }You are not really improving readability by just wrapping the line arbitrarily though.
Quoted 2 lines
If you're offended by the long line, better rework the code so the long line is not needed.
Generally the best way to do that is to separate
the declaration from the initialization like:
if (status <= 0) {
struct timespec64 ts64;
ts64 = ktime_to_timespec64(pt->base.timestamp);
seq_printf(s, "@%lld.%09ld", (s64)ts64.tv_sec, ts64.tv_nsec);
}PATCH 1/1 staging: android: fix coding style error (v2)
Simple style fix - 80 char limit was exceeded.
This is second version of the patch. Thanks Joe Perches.
Context: eudyptula challenge (http://eudyptula-challenge.org/)
--- drivers/staging/android/sync_debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/android/sync_debug.c +2 -1
@@ -96,8 +96,9 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) sync_status_str(status));if (status <=0 ) { -struct timespec64 ts64 =ktime_to_timespec64 (pt->base.timestamp); +struct timespec64 ts64; + ts64 =ktime_to_timespec64 (pt->base.timestamp);seq_printf (s,"@%lld.%09ld" , (s64 )ts64.tv_sec, ts64.tv_nsec); }
Signature · 1 line
2.1.4
Re: [PATCH] staging: android: fix coding style error (v2)
Put the v2 in "[PATCH v2]" so that it gets removed and not stored in the permanent changelog.
Quoted 3 lines · Patrick Boettcher
Simple style fix - 80 char limit was exceeded.
This is second version of the patch. Thanks Joe Perches.
Put this line under the -- cut off.
Quoted 2 lines
Context: eudyptula challenge (http://eudyptula-challenge.org/)
Don't write this line.
Quoted 13 lines
Signed-off-by Patrick Boettcher <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Arnd Bergmann <[email protected]>Cc John Stultz <[email protected]>Cc Peter Senna Tschudin <[email protected]>Cc Daniel Vetter <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Tapasweni Pathak <[email protected]>Cc Joe Perches <[email protected]>
This block is not needed. This is a whitespace patch not something controversial where we will need to look at who was CC'd so that we can get annoyed at them for ignoring critical information.
regards,
dan carpenter
Re: [PATCH] staging: android: fix coding style error (v2)
Hi Dan,
Thanks for your valuable input. It's appreciated.
Quoted 5 lines · On Wed, 14 Jan 2015 12:28:44 +0300 Dan Carpenter <[email protected]>…
Quoted 1 line
lots of Cc:'s [..]
This block is not needed. This is a whitespace patch not something controversial where we will need to look at who was CC'd so that we can get annoyed at them for ignoring critical information.
Yes, I was wondering which criteria to apply for stripping off people from the get_maintainer.pl-output - and that even though my patch is brilliant ;-).
Thanks again,
--
Patrick.