diff options
| author | Joe Perches <joe@perches.com> | 2015-04-15 19:18:11 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:35:25 -0400 |
| commit | dc640a8813c0015e5a620d41e47df94c9879749d (patch) | |
| tree | 4918eb4e3a65d49d481a6c28bd92beaec4dded16 /arch/cris/arch-v32/kernel | |
| parent | 1336d4221dee528b5a0e92d2b1322790c4df1b53 (diff) | |
cris fasttimer: remove use of seq_printf return value
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.
See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")
Miscellanea:
o Coalesce formats, realign arguments
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/cris/arch-v32/kernel')
| -rw-r--r-- | arch/cris/arch-v32/kernel/fasttimer.c | 85 |
1 files changed, 39 insertions, 46 deletions
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c index b130c2c5fdd8..5c84dbb99f30 100644 --- a/arch/cris/arch-v32/kernel/fasttimer.c +++ b/arch/cris/arch-v32/kernel/fasttimer.c | |||
| @@ -501,7 +501,8 @@ static int proc_fasttimer_show(struct seq_file *m, void *v) | |||
| 501 | i = debug_log_cnt; | 501 | i = debug_log_cnt; |
| 502 | 502 | ||
| 503 | while ((i != end_i || debug_log_cnt_wrapped)) { | 503 | while ((i != end_i || debug_log_cnt_wrapped)) { |
| 504 | if (seq_printf(m, debug_log_string[i], debug_log_value[i]) < 0) | 504 | seq_printf(m, debug_log_string[i], debug_log_value[i]); |
| 505 | if (seq_has_overflowed(m)) | ||
| 505 | return 0; | 506 | return 0; |
| 506 | i = (i+1) % DEBUG_LOG_MAX; | 507 | i = (i+1) % DEBUG_LOG_MAX; |
| 507 | } | 508 | } |
| @@ -516,23 +517,21 @@ static int proc_fasttimer_show(struct seq_file *m, void *v) | |||
| 516 | int cur = (fast_timers_started - i - 1) % NUM_TIMER_STATS; | 517 | int cur = (fast_timers_started - i - 1) % NUM_TIMER_STATS; |
| 517 | 518 | ||
| 518 | #if 1 //ndef FAST_TIMER_LOG | 519 | #if 1 //ndef FAST_TIMER_LOG |
| 519 | seq_printf(m, "div: %i delay: %i" | 520 | seq_printf(m, "div: %i delay: %i\n", |
| 520 | "\n", | ||
| 521 | timer_div_settings[cur], | 521 | timer_div_settings[cur], |
| 522 | timer_delay_settings[cur]); | 522 | timer_delay_settings[cur]); |
| 523 | #endif | 523 | #endif |
| 524 | #ifdef FAST_TIMER_LOG | 524 | #ifdef FAST_TIMER_LOG |
| 525 | t = &timer_started_log[cur]; | 525 | t = &timer_started_log[cur]; |
| 526 | if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " | 526 | seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n", |
| 527 | "d: %6li us data: 0x%08lX" | 527 | t->name, |
| 528 | "\n", | 528 | (unsigned long)t->tv_set.tv_jiff, |
| 529 | t->name, | 529 | (unsigned long)t->tv_set.tv_usec, |
| 530 | (unsigned long)t->tv_set.tv_jiff, | 530 | (unsigned long)t->tv_expires.tv_jiff, |
| 531 | (unsigned long)t->tv_set.tv_usec, | 531 | (unsigned long)t->tv_expires.tv_usec, |
| 532 | (unsigned long)t->tv_expires.tv_jiff, | 532 | t->delay_us, |
| 533 | (unsigned long)t->tv_expires.tv_usec, | 533 | t->data); |
| 534 | t->delay_us, | 534 | if (seq_has_overflowed(m)) |
| 535 | t->data) < 0) | ||
| 536 | return 0; | 535 | return 0; |
| 537 | #endif | 536 | #endif |
| 538 | } | 537 | } |
| @@ -544,16 +543,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v) | |||
| 544 | seq_printf(m, "Timers added: %i\n", fast_timers_added); | 543 | seq_printf(m, "Timers added: %i\n", fast_timers_added); |
| 545 | for (i = 0; i < num_to_show; i++) { | 544 | for (i = 0; i < num_to_show; i++) { |
| 546 | t = &timer_added_log[(fast_timers_added - i - 1) % NUM_TIMER_STATS]; | 545 | t = &timer_added_log[(fast_timers_added - i - 1) % NUM_TIMER_STATS]; |
| 547 | if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " | 546 | seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n", |
| 548 | "d: %6li us data: 0x%08lX" | 547 | t->name, |
| 549 | "\n", | 548 | (unsigned long)t->tv_set.tv_jiff, |
| 550 | t->name, | 549 | (unsigned long)t->tv_set.tv_usec, |
| 551 | (unsigned long)t->tv_set.tv_jiff, | 550 | (unsigned long)t->tv_expires.tv_jiff, |
| 552 | (unsigned long)t->tv_set.tv_usec, | 551 | (unsigned long)t->tv_expires.tv_usec, |
| 553 | (unsigned long)t->tv_expires.tv_jiff, | 552 | t->delay_us, |
| 554 | (unsigned long)t->tv_expires.tv_usec, | 553 | t->data); |
| 555 | t->delay_us, | 554 | if (seq_has_overflowed(m)) |
| 556 | t->data) < 0) | ||
| 557 | return 0; | 555 | return 0; |
| 558 | } | 556 | } |
| 559 | seq_putc(m, '\n'); | 557 | seq_putc(m, '\n'); |
| @@ -563,16 +561,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v) | |||
| 563 | seq_printf(m, "Timers expired: %i\n", fast_timers_expired); | 561 | seq_printf(m, "Timers expired: %i\n", fast_timers_expired); |
| 564 | for (i = 0; i < num_to_show; i++){ | 562 | for (i = 0; i < num_to_show; i++){ |
| 565 | t = &timer_expired_log[(fast_timers_expired - i - 1) % NUM_TIMER_STATS]; | 563 | t = &timer_expired_log[(fast_timers_expired - i - 1) % NUM_TIMER_STATS]; |
| 566 | if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " | 564 | seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n", |
| 567 | "d: %6li us data: 0x%08lX" | 565 | t->name, |
| 568 | "\n", | 566 | (unsigned long)t->tv_set.tv_jiff, |
| 569 | t->name, | 567 | (unsigned long)t->tv_set.tv_usec, |
| 570 | (unsigned long)t->tv_set.tv_jiff, | 568 | (unsigned long)t->tv_expires.tv_jiff, |
| 571 | (unsigned long)t->tv_set.tv_usec, | 569 | (unsigned long)t->tv_expires.tv_usec, |
| 572 | (unsigned long)t->tv_expires.tv_jiff, | 570 | t->delay_us, |
| 573 | (unsigned long)t->tv_expires.tv_usec, | 571 | t->data); |
| 574 | t->delay_us, | 572 | if (seq_has_overflowed(m)) |
| 575 | t->data) < 0) | ||
| 576 | return 0; | 573 | return 0; |
| 577 | } | 574 | } |
| 578 | seq_putc(m, '\n'); | 575 | seq_putc(m, '\n'); |
| @@ -584,19 +581,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v) | |||
| 584 | while (t != NULL){ | 581 | while (t != NULL){ |
| 585 | nextt = t->next; | 582 | nextt = t->next; |
| 586 | local_irq_restore(flags); | 583 | local_irq_restore(flags); |
| 587 | if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " | 584 | seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n", |
| 588 | "d: %6li us data: 0x%08lX" | 585 | t->name, |
| 589 | /* " func: 0x%08lX" */ | 586 | (unsigned long)t->tv_set.tv_jiff, |
| 590 | "\n", | 587 | (unsigned long)t->tv_set.tv_usec, |
| 591 | t->name, | 588 | (unsigned long)t->tv_expires.tv_jiff, |
| 592 | (unsigned long)t->tv_set.tv_jiff, | 589 | (unsigned long)t->tv_expires.tv_usec, |
| 593 | (unsigned long)t->tv_set.tv_usec, | 590 | t->delay_us, |
| 594 | (unsigned long)t->tv_expires.tv_jiff, | 591 | t->data); |
| 595 | (unsigned long)t->tv_expires.tv_usec, | 592 | if (seq_has_overflowed(m)) |
| 596 | t->delay_us, | ||
| 597 | t->data | ||
| 598 | /* , t->function */ | ||
| 599 | ) < 0) | ||
| 600 | return 0; | 593 | return 0; |
| 601 | local_irq_save(flags); | 594 | local_irq_save(flags); |
| 602 | if (t->next != nextt) | 595 | if (t->next != nextt) |
