* [PATCH] staging: android: fix coding style error
@ 2015-01-14 8:20 Patrick Boettcher
2015-01-14 8:32 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Boettcher @ 2015-01-14 8:20 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Patrick Boettcher, Arnd Bergmann, John Stultz,
Peter Senna Tschudin, Daniel Vetter, Maarten Lankhorst,
Tapasweni Pathak, devel, linux-kernel
Simple style fix - 80 char limit was exceeded.
Context: eudyptula challenge (http://eudyptula-challenge.org/)
Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Tapasweni Pathak <tapaswenipathak@gmail.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/android/sync_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index 1532a86..9a2aaf8 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -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);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: android: fix coding style error
2015-01-14 8:20 [PATCH] staging: android: fix coding style error Patrick Boettcher
@ 2015-01-14 8:32 ` Arnd Bergmann
2015-01-14 8:41 ` Joe Perches
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-14 8:32 UTC (permalink / raw)
To: Patrick Boettcher
Cc: Greg Kroah-Hartman, John Stultz, Peter Senna Tschudin,
Daniel Vetter, Maarten Lankhorst, Tapasweni Pathak, devel,
linux-kernel
On Wednesday 14 January 2015 09:20:42 Patrick Boettcher wrote:
> diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
> index 1532a86..9a2aaf8 100644
> --- a/drivers/staging/android/sync_debug.c
> +++ b/drivers/staging/android/sync_debug.c
> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: android: fix coding style error
2015-01-14 8:32 ` Arnd Bergmann
@ 2015-01-14 8:41 ` Joe Perches
2015-01-14 9:10 ` [PATCH] staging: android: fix coding style error (v2) Patrick Boettcher
0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2015-01-14 8:41 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Patrick Boettcher, Greg Kroah-Hartman, John Stultz,
Peter Senna Tschudin, Daniel Vetter, Maarten Lankhorst,
Tapasweni Pathak, devel, linux-kernel
On Wed, 2015-01-14 at 09:32 +0100, Arnd Bergmann wrote:
> On Wednesday 14 January 2015 09:20:42 Patrick Boettcher wrote:
> > diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
[]
> > @@ -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.
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);
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] staging: android: fix coding style error (v2)
2015-01-14 8:41 ` Joe Perches
@ 2015-01-14 9:10 ` Patrick Boettcher
2015-01-14 9:28 ` Dan Carpenter
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Boettcher @ 2015-01-14 9:10 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Patrick Boettcher, Arnd Bergmann, John Stultz,
Peter Senna Tschudin, Daniel Vetter, Maarten Lankhorst,
Tapasweni Pathak, Joe Perches, devel, linux-kernel
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/)
Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Tapasweni Pathak <tapaswenipathak@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
---
drivers/staging/android/sync_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index 1532a86..d6edf37 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -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);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: android: fix coding style error (v2)
2015-01-14 9:10 ` [PATCH] staging: android: fix coding style error (v2) Patrick Boettcher
@ 2015-01-14 9:28 ` Dan Carpenter
2015-01-14 10:25 ` Patrick Boettcher
0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2015-01-14 9:28 UTC (permalink / raw)
To: Patrick Boettcher
Cc: Greg Kroah-Hartman, devel, Arnd Bergmann, Tapasweni Pathak,
Peter Senna Tschudin, linux-kernel, Joe Perches, John Stultz,
Daniel Vetter, Maarten Lankhorst
Put the v2 in "[PATCH v2]" so that it gets removed and not stored in the
permanent changelog.
On Wed, Jan 14, 2015 at 10:10:36AM +0100, Patrick Boettcher wrote:
> 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.
>
> Context: eudyptula challenge (http://eudyptula-challenge.org/)
Don't write this line.
>
> Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Peter Senna Tschudin <peter.senna@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> Cc: Tapasweni Pathak <tapaswenipathak@gmail.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: devel@driverdev.osuosl.org
> Cc: linux-kernel@vger.kernel.org
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: android: fix coding style error (v2)
2015-01-14 9:28 ` Dan Carpenter
@ 2015-01-14 10:25 ` Patrick Boettcher
0 siblings, 0 replies; 6+ messages in thread
From: Patrick Boettcher @ 2015-01-14 10:25 UTC (permalink / raw)
To: Dan Carpenter; +Cc: devel, linux-kernel
Hi Dan,
Thanks for your valuable input. It's appreciated.
On Wed, 14 Jan 2015 12:28:44 +0300 Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> > 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-14 10:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-14 8:20 [PATCH] staging: android: fix coding style error Patrick Boettcher
2015-01-14 8:32 ` Arnd Bergmann
2015-01-14 8:41 ` Joe Perches
2015-01-14 9:10 ` [PATCH] staging: android: fix coding style error (v2) Patrick Boettcher
2015-01-14 9:28 ` Dan Carpenter
2015-01-14 10:25 ` Patrick Boettcher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox