From: Joe Perches <joe@perches.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Patrick Boettcher <patrick.boettcher@posteo.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
John Stultz <john.stultz@linaro.org>,
Peter Senna Tschudin <peter.senna@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@canonical.com>,
Tapasweni Pathak <tapaswenipathak@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: android: fix coding style error
Date: Wed, 14 Jan 2015 00:41:23 -0800 [thread overview]
Message-ID: <1421224883.2847.3.camel@perches.com> (raw)
In-Reply-To: <1839300.4mCDOMkO8E@wuerfel>
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);
}
next prev parent reply other threads:[~2015-01-14 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=1421224883.2847.3.camel@perches.com \
--to=joe@perches.com \
--cc=arnd@arndb.de \
--cc=daniel@ffwll.ch \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@canonical.com \
--cc=patrick.boettcher@posteo.de \
--cc=peter.senna@gmail.com \
--cc=tapaswenipathak@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