Skip to content

Commit

Permalink
staging: android: Cleanup style issues
Browse files Browse the repository at this point in the history
This patch fixes the following checkpatch warnings:
 - Remove else after return
 - Add space after declaration

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Peter Senna Tschudin authored and Greg Kroah-Hartman committed Jul 12, 2014
1 parent d8e1e01 commit 9545135
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions drivers/staging/android/sync_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ static const char *sync_status_str(int status)
{
if (status == 0)
return "signaled";
else if (status > 0)

if (status > 0)
return "active";
else
return "error";

return "error";
}

static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence)
Expand All @@ -95,12 +96,14 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence)

if (status <= 0) {
struct timeval tv = ktime_to_timeval(pt->base.timestamp);

seq_printf(s, "@%ld.%06ld", tv.tv_sec, tv.tv_usec);
}

if (parent->ops->timeline_value_str &&
parent->ops->pt_value_str) {
char value[64];

parent->ops->pt_value_str(pt, value, sizeof(value));
seq_printf(s, ": %s", value);
if (fence) {
Expand All @@ -122,6 +125,7 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)

if (obj->ops->timeline_value_str) {
char value[64];

obj->ops->timeline_value_str(obj, value, sizeof(value));
seq_printf(s, ": %s", value);
}
Expand Down Expand Up @@ -234,6 +238,7 @@ void sync_dump(void)
for (i = 0; i < s.count; i += DUMP_CHUNK) {
if ((s.count - i) > DUMP_CHUNK) {
char c = s.buf[i + DUMP_CHUNK];

s.buf[i + DUMP_CHUNK] = 0;
pr_cont("%s", s.buf + i);
s.buf[i + DUMP_CHUNK] = c;
Expand Down

0 comments on commit 9545135

Please sign in to comment.