diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-06 17:38:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:18 -0400 |
commit | c1d4518c4e530fc47180a1858d7d0ad55a069d41 (patch) | |
tree | 4d5be1c1e0cf12dd077538fd4ecb6c97a563792f /fs/dlm | |
parent | 6edb56871a524a879c2356860917ebb01ffd20c4 (diff) |
fs/dlm/debug_fs.c: replace seq_printf by seq_puts
Replace seq_printf where possible. This patch also fixes the following
checkpatch warning "unnecessary whitespace before a quoted newline"
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/debug_fs.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c index b969deef9ebb..8d77ba7b1756 100644 --- a/fs/dlm/debug_fs.c +++ b/fs/dlm/debug_fs.c | |||
@@ -68,7 +68,7 @@ static int print_format1_lock(struct seq_file *s, struct dlm_lkb *lkb, | |||
68 | if (lkb->lkb_wait_type) | 68 | if (lkb->lkb_wait_type) |
69 | seq_printf(s, " wait_type: %d", lkb->lkb_wait_type); | 69 | seq_printf(s, " wait_type: %d", lkb->lkb_wait_type); |
70 | 70 | ||
71 | return seq_printf(s, "\n"); | 71 | return seq_puts(s, "\n"); |
72 | } | 72 | } |
73 | 73 | ||
74 | static int print_format1(struct dlm_rsb *res, struct seq_file *s) | 74 | static int print_format1(struct dlm_rsb *res, struct seq_file *s) |
@@ -92,31 +92,31 @@ static int print_format1(struct dlm_rsb *res, struct seq_file *s) | |||
92 | } | 92 | } |
93 | 93 | ||
94 | if (res->res_nodeid > 0) | 94 | if (res->res_nodeid > 0) |
95 | rv = seq_printf(s, "\" \nLocal Copy, Master is node %d\n", | 95 | rv = seq_printf(s, "\"\nLocal Copy, Master is node %d\n", |
96 | res->res_nodeid); | 96 | res->res_nodeid); |
97 | else if (res->res_nodeid == 0) | 97 | else if (res->res_nodeid == 0) |
98 | rv = seq_printf(s, "\" \nMaster Copy\n"); | 98 | rv = seq_puts(s, "\"\nMaster Copy\n"); |
99 | else if (res->res_nodeid == -1) | 99 | else if (res->res_nodeid == -1) |
100 | rv = seq_printf(s, "\" \nLooking up master (lkid %x)\n", | 100 | rv = seq_printf(s, "\"\nLooking up master (lkid %x)\n", |
101 | res->res_first_lkid); | 101 | res->res_first_lkid); |
102 | else | 102 | else |
103 | rv = seq_printf(s, "\" \nInvalid master %d\n", | 103 | rv = seq_printf(s, "\"\nInvalid master %d\n", |
104 | res->res_nodeid); | 104 | res->res_nodeid); |
105 | if (rv) | 105 | if (rv) |
106 | goto out; | 106 | goto out; |
107 | 107 | ||
108 | /* Print the LVB: */ | 108 | /* Print the LVB: */ |
109 | if (res->res_lvbptr) { | 109 | if (res->res_lvbptr) { |
110 | seq_printf(s, "LVB: "); | 110 | seq_puts(s, "LVB: "); |
111 | for (i = 0; i < lvblen; i++) { | 111 | for (i = 0; i < lvblen; i++) { |
112 | if (i == lvblen / 2) | 112 | if (i == lvblen / 2) |
113 | seq_printf(s, "\n "); | 113 | seq_puts(s, "\n "); |
114 | seq_printf(s, "%02x ", | 114 | seq_printf(s, "%02x ", |
115 | (unsigned char) res->res_lvbptr[i]); | 115 | (unsigned char) res->res_lvbptr[i]); |
116 | } | 116 | } |
117 | if (rsb_flag(res, RSB_VALNOTVALID)) | 117 | if (rsb_flag(res, RSB_VALNOTVALID)) |
118 | seq_printf(s, " (INVALID)"); | 118 | seq_puts(s, " (INVALID)"); |
119 | rv = seq_printf(s, "\n"); | 119 | rv = seq_puts(s, "\n"); |
120 | if (rv) | 120 | if (rv) |
121 | goto out; | 121 | goto out; |
122 | } | 122 | } |
@@ -133,21 +133,21 @@ static int print_format1(struct dlm_rsb *res, struct seq_file *s) | |||
133 | } | 133 | } |
134 | 134 | ||
135 | /* Print the locks attached to this resource */ | 135 | /* Print the locks attached to this resource */ |
136 | seq_printf(s, "Granted Queue\n"); | 136 | seq_puts(s, "Granted Queue\n"); |
137 | list_for_each_entry(lkb, &res->res_grantqueue, lkb_statequeue) { | 137 | list_for_each_entry(lkb, &res->res_grantqueue, lkb_statequeue) { |
138 | rv = print_format1_lock(s, lkb, res); | 138 | rv = print_format1_lock(s, lkb, res); |
139 | if (rv) | 139 | if (rv) |
140 | goto out; | 140 | goto out; |
141 | } | 141 | } |
142 | 142 | ||
143 | seq_printf(s, "Conversion Queue\n"); | 143 | seq_puts(s, "Conversion Queue\n"); |
144 | list_for_each_entry(lkb, &res->res_convertqueue, lkb_statequeue) { | 144 | list_for_each_entry(lkb, &res->res_convertqueue, lkb_statequeue) { |
145 | rv = print_format1_lock(s, lkb, res); | 145 | rv = print_format1_lock(s, lkb, res); |
146 | if (rv) | 146 | if (rv) |
147 | goto out; | 147 | goto out; |
148 | } | 148 | } |
149 | 149 | ||
150 | seq_printf(s, "Waiting Queue\n"); | 150 | seq_puts(s, "Waiting Queue\n"); |
151 | list_for_each_entry(lkb, &res->res_waitqueue, lkb_statequeue) { | 151 | list_for_each_entry(lkb, &res->res_waitqueue, lkb_statequeue) { |
152 | rv = print_format1_lock(s, lkb, res); | 152 | rv = print_format1_lock(s, lkb, res); |
153 | if (rv) | 153 | if (rv) |
@@ -157,13 +157,13 @@ static int print_format1(struct dlm_rsb *res, struct seq_file *s) | |||
157 | if (list_empty(&res->res_lookup)) | 157 | if (list_empty(&res->res_lookup)) |
158 | goto out; | 158 | goto out; |
159 | 159 | ||
160 | seq_printf(s, "Lookup Queue\n"); | 160 | seq_puts(s, "Lookup Queue\n"); |
161 | list_for_each_entry(lkb, &res->res_lookup, lkb_rsb_lookup) { | 161 | list_for_each_entry(lkb, &res->res_lookup, lkb_rsb_lookup) { |
162 | rv = seq_printf(s, "%08x %s", lkb->lkb_id, | 162 | rv = seq_printf(s, "%08x %s", lkb->lkb_id, |
163 | print_lockmode(lkb->lkb_rqmode)); | 163 | print_lockmode(lkb->lkb_rqmode)); |
164 | if (lkb->lkb_wait_type) | 164 | if (lkb->lkb_wait_type) |
165 | seq_printf(s, " wait_type: %d", lkb->lkb_wait_type); | 165 | seq_printf(s, " wait_type: %d", lkb->lkb_wait_type); |
166 | rv = seq_printf(s, "\n"); | 166 | rv = seq_puts(s, "\n"); |
167 | } | 167 | } |
168 | out: | 168 | out: |
169 | unlock_rsb(res); | 169 | unlock_rsb(res); |
@@ -300,7 +300,7 @@ static int print_format3(struct dlm_rsb *r, struct seq_file *s) | |||
300 | else | 300 | else |
301 | seq_printf(s, " %02x", (unsigned char)r->res_name[i]); | 301 | seq_printf(s, " %02x", (unsigned char)r->res_name[i]); |
302 | } | 302 | } |
303 | rv = seq_printf(s, "\n"); | 303 | rv = seq_puts(s, "\n"); |
304 | if (rv) | 304 | if (rv) |
305 | goto out; | 305 | goto out; |
306 | 306 | ||
@@ -311,7 +311,7 @@ static int print_format3(struct dlm_rsb *r, struct seq_file *s) | |||
311 | 311 | ||
312 | for (i = 0; i < lvblen; i++) | 312 | for (i = 0; i < lvblen; i++) |
313 | seq_printf(s, " %02x", (unsigned char)r->res_lvbptr[i]); | 313 | seq_printf(s, " %02x", (unsigned char)r->res_lvbptr[i]); |
314 | rv = seq_printf(s, "\n"); | 314 | rv = seq_puts(s, "\n"); |
315 | if (rv) | 315 | if (rv) |
316 | goto out; | 316 | goto out; |
317 | 317 | ||
@@ -377,7 +377,7 @@ static int print_format4(struct dlm_rsb *r, struct seq_file *s) | |||
377 | else | 377 | else |
378 | seq_printf(s, " %02x", (unsigned char)r->res_name[i]); | 378 | seq_printf(s, " %02x", (unsigned char)r->res_name[i]); |
379 | } | 379 | } |
380 | rv = seq_printf(s, "\n"); | 380 | rv = seq_puts(s, "\n"); |
381 | out: | 381 | out: |
382 | unlock_rsb(r); | 382 | unlock_rsb(r); |
383 | return rv; | 383 | return rv; |