aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/log.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2012-04-30 15:29:02 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-04-30 15:53:56 -0400
commit617d3c7a50b3dc15f558d60013047aede79dc055 (patch)
tree03908b63390eae5046618595b29f9ff30aea667a /net/tipc/log.c
parentaad585473fe1e4b07f2ec1e2432475937f90c385 (diff)
tipc: compress out gratuitous extra carriage returns
Some of the comment blocks are floating in limbo between two functions, or between blocks of code. Delete the extra line feeds between any comment and its associated following block of code, to be consistent with the majority of the rest of the kernel. Also delete trailing newlines at EOF and fix a couple trivial typos in existing comments. This is a 100% cosmetic change with no runtime impact. We get rid of over 500 lines of non-code, and being blank line deletes, they won't even show up as noise in git blame. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/log.c')
-rw-r--r--net/tipc/log.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/net/tipc/log.c b/net/tipc/log.c
index 895c6e530b0b..026733f24919 100644
--- a/net/tipc/log.c
+++ b/net/tipc/log.c
@@ -47,7 +47,6 @@
47 * 47 *
48 * Additional user-defined print buffers are also permitted. 48 * Additional user-defined print buffers are also permitted.
49 */ 49 */
50
51static struct print_buf null_buf = { NULL, 0, NULL, 0 }; 50static struct print_buf null_buf = { NULL, 0, NULL, 0 };
52struct print_buf *const TIPC_NULL = &null_buf; 51struct print_buf *const TIPC_NULL = &null_buf;
53 52
@@ -72,7 +71,6 @@ struct print_buf *const TIPC_LOG = &log_buf;
72 * on the caller to prevent simultaneous use of the print buffer(s) being 71 * on the caller to prevent simultaneous use of the print buffer(s) being
73 * manipulated. 72 * manipulated.
74 */ 73 */
75
76static char print_string[TIPC_PB_MAX_STR]; 74static char print_string[TIPC_PB_MAX_STR];
77static DEFINE_SPINLOCK(print_lock); 75static DEFINE_SPINLOCK(print_lock);
78 76
@@ -97,7 +95,6 @@ static void tipc_printbuf_move(struct print_buf *pb_to,
97 * Note: If the character array is too small (or absent), the print buffer 95 * Note: If the character array is too small (or absent), the print buffer
98 * becomes a null device that discards anything written to it. 96 * becomes a null device that discards anything written to it.
99 */ 97 */
100
101void tipc_printbuf_init(struct print_buf *pb, char *raw, u32 size) 98void tipc_printbuf_init(struct print_buf *pb, char *raw, u32 size)
102{ 99{
103 pb->buf = raw; 100 pb->buf = raw;
@@ -117,7 +114,6 @@ void tipc_printbuf_init(struct print_buf *pb, char *raw, u32 size)
117 * tipc_printbuf_reset - reinitialize print buffer to empty state 114 * tipc_printbuf_reset - reinitialize print buffer to empty state
118 * @pb: pointer to print buffer structure 115 * @pb: pointer to print buffer structure
119 */ 116 */
120
121static void tipc_printbuf_reset(struct print_buf *pb) 117static void tipc_printbuf_reset(struct print_buf *pb)
122{ 118{
123 if (pb->buf) { 119 if (pb->buf) {
@@ -133,7 +129,6 @@ static void tipc_printbuf_reset(struct print_buf *pb)
133 * 129 *
134 * Returns non-zero if print buffer is empty. 130 * Returns non-zero if print buffer is empty.
135 */ 131 */
136
137static int tipc_printbuf_empty(struct print_buf *pb) 132static int tipc_printbuf_empty(struct print_buf *pb)
138{ 133{
139 return !pb->buf || (pb->crs == pb->buf); 134 return !pb->buf || (pb->crs == pb->buf);
@@ -148,7 +143,6 @@ static int tipc_printbuf_empty(struct print_buf *pb)
148 * 143 *
149 * Returns length of print buffer data string (including trailing NUL) 144 * Returns length of print buffer data string (including trailing NUL)
150 */ 145 */
151
152int tipc_printbuf_validate(struct print_buf *pb) 146int tipc_printbuf_validate(struct print_buf *pb)
153{ 147{
154 char *err = "\n\n*** PRINT BUFFER OVERFLOW ***\n\n"; 148 char *err = "\n\n*** PRINT BUFFER OVERFLOW ***\n\n";
@@ -182,14 +176,12 @@ int tipc_printbuf_validate(struct print_buf *pb)
182 * Current contents of destination print buffer (if any) are discarded. 176 * Current contents of destination print buffer (if any) are discarded.
183 * Source print buffer becomes empty if a successful move occurs. 177 * Source print buffer becomes empty if a successful move occurs.
184 */ 178 */
185
186static void tipc_printbuf_move(struct print_buf *pb_to, 179static void tipc_printbuf_move(struct print_buf *pb_to,
187 struct print_buf *pb_from) 180 struct print_buf *pb_from)
188{ 181{
189 int len; 182 int len;
190 183
191 /* Handle the cases where contents can't be moved */ 184 /* Handle the cases where contents can't be moved */
192
193 if (!pb_to->buf) 185 if (!pb_to->buf)
194 return; 186 return;
195 187
@@ -206,7 +198,6 @@ static void tipc_printbuf_move(struct print_buf *pb_to,
206 } 198 }
207 199
208 /* Copy data from char after cursor to end (if used) */ 200 /* Copy data from char after cursor to end (if used) */
209
210 len = pb_from->buf + pb_from->size - pb_from->crs - 2; 201 len = pb_from->buf + pb_from->size - pb_from->crs - 2;
211 if ((pb_from->buf[pb_from->size - 1] == 0) && (len > 0)) { 202 if ((pb_from->buf[pb_from->size - 1] == 0) && (len > 0)) {
212 strcpy(pb_to->buf, pb_from->crs + 1); 203 strcpy(pb_to->buf, pb_from->crs + 1);
@@ -215,7 +206,6 @@ static void tipc_printbuf_move(struct print_buf *pb_to,
215 pb_to->crs = pb_to->buf; 206 pb_to->crs = pb_to->buf;
216 207
217 /* Copy data from start to cursor (always) */ 208 /* Copy data from start to cursor (always) */
218
219 len = pb_from->crs - pb_from->buf; 209 len = pb_from->crs - pb_from->buf;
220 strcpy(pb_to->crs, pb_from->buf); 210 strcpy(pb_to->crs, pb_from->buf);
221 pb_to->crs += len; 211 pb_to->crs += len;
@@ -228,7 +218,6 @@ static void tipc_printbuf_move(struct print_buf *pb_to,
228 * @pb: pointer to print buffer 218 * @pb: pointer to print buffer
229 * @fmt: formatted info to be printed 219 * @fmt: formatted info to be printed
230 */ 220 */
231
232void tipc_printf(struct print_buf *pb, const char *fmt, ...) 221void tipc_printf(struct print_buf *pb, const char *fmt, ...)
233{ 222{
234 int chars_to_add; 223 int chars_to_add;
@@ -270,7 +259,6 @@ void tipc_printf(struct print_buf *pb, const char *fmt, ...)
270 * tipc_log_resize - change the size of the TIPC log buffer 259 * tipc_log_resize - change the size of the TIPC log buffer
271 * @log_size: print buffer size to use 260 * @log_size: print buffer size to use
272 */ 261 */
273
274int tipc_log_resize(int log_size) 262int tipc_log_resize(int log_size)
275{ 263{
276 int res = 0; 264 int res = 0;
@@ -295,7 +283,6 @@ int tipc_log_resize(int log_size)
295/** 283/**
296 * tipc_log_resize_cmd - reconfigure size of TIPC log buffer 284 * tipc_log_resize_cmd - reconfigure size of TIPC log buffer
297 */ 285 */
298
299struct sk_buff *tipc_log_resize_cmd(const void *req_tlv_area, int req_tlv_space) 286struct sk_buff *tipc_log_resize_cmd(const void *req_tlv_area, int req_tlv_space)
300{ 287{
301 u32 value; 288 u32 value;
@@ -316,7 +303,6 @@ struct sk_buff *tipc_log_resize_cmd(const void *req_tlv_area, int req_tlv_space)
316/** 303/**
317 * tipc_log_dump - capture TIPC log buffer contents in configuration message 304 * tipc_log_dump - capture TIPC log buffer contents in configuration message
318 */ 305 */
319
320struct sk_buff *tipc_log_dump(void) 306struct sk_buff *tipc_log_dump(void)
321{ 307{
322 struct sk_buff *reply; 308 struct sk_buff *reply;