diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2014-07-12 15:55:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-12 16:24:19 -0400 |
commit | 954513551f5afb7893b7c688a67219356ab3efe6 (patch) | |
tree | 9d840c2fee4c0d84d0526d6d9f454dd5a929e876 | |
parent | d8e1e01289316552bd5037aaa1f5a0e8d22b0eb3 (diff) |
staging: android: Cleanup style issues
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>
-rw-r--r-- | drivers/staging/android/sync_debug.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c index a9f7fd506da3..257fc91bf02b 100644 --- a/drivers/staging/android/sync_debug.c +++ b/drivers/staging/android/sync_debug.c | |||
@@ -74,10 +74,11 @@ static const char *sync_status_str(int status) | |||
74 | { | 74 | { |
75 | if (status == 0) | 75 | if (status == 0) |
76 | return "signaled"; | 76 | return "signaled"; |
77 | else if (status > 0) | 77 | |
78 | if (status > 0) | ||
78 | return "active"; | 79 | return "active"; |
79 | else | 80 | |
80 | return "error"; | 81 | return "error"; |
81 | } | 82 | } |
82 | 83 | ||
83 | static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) | 84 | static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) |
@@ -95,12 +96,14 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) | |||
95 | 96 | ||
96 | if (status <= 0) { | 97 | if (status <= 0) { |
97 | struct timeval tv = ktime_to_timeval(pt->base.timestamp); | 98 | struct timeval tv = ktime_to_timeval(pt->base.timestamp); |
99 | |||
98 | seq_printf(s, "@%ld.%06ld", tv.tv_sec, tv.tv_usec); | 100 | seq_printf(s, "@%ld.%06ld", tv.tv_sec, tv.tv_usec); |
99 | } | 101 | } |
100 | 102 | ||
101 | if (parent->ops->timeline_value_str && | 103 | if (parent->ops->timeline_value_str && |
102 | parent->ops->pt_value_str) { | 104 | parent->ops->pt_value_str) { |
103 | char value[64]; | 105 | char value[64]; |
106 | |||
104 | parent->ops->pt_value_str(pt, value, sizeof(value)); | 107 | parent->ops->pt_value_str(pt, value, sizeof(value)); |
105 | seq_printf(s, ": %s", value); | 108 | seq_printf(s, ": %s", value); |
106 | if (fence) { | 109 | if (fence) { |
@@ -122,6 +125,7 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj) | |||
122 | 125 | ||
123 | if (obj->ops->timeline_value_str) { | 126 | if (obj->ops->timeline_value_str) { |
124 | char value[64]; | 127 | char value[64]; |
128 | |||
125 | obj->ops->timeline_value_str(obj, value, sizeof(value)); | 129 | obj->ops->timeline_value_str(obj, value, sizeof(value)); |
126 | seq_printf(s, ": %s", value); | 130 | seq_printf(s, ": %s", value); |
127 | } | 131 | } |
@@ -234,6 +238,7 @@ void sync_dump(void) | |||
234 | for (i = 0; i < s.count; i += DUMP_CHUNK) { | 238 | for (i = 0; i < s.count; i += DUMP_CHUNK) { |
235 | if ((s.count - i) > DUMP_CHUNK) { | 239 | if ((s.count - i) > DUMP_CHUNK) { |
236 | char c = s.buf[i + DUMP_CHUNK]; | 240 | char c = s.buf[i + DUMP_CHUNK]; |
241 | |||
237 | s.buf[i + DUMP_CHUNK] = 0; | 242 | s.buf[i + DUMP_CHUNK] = 0; |
238 | pr_cont("%s", s.buf + i); | 243 | pr_cont("%s", s.buf + i); |
239 | s.buf[i + DUMP_CHUNK] = c; | 244 | s.buf[i + DUMP_CHUNK] = c; |