diff options
author | Joe Perches <joe@perches.com> | 2015-04-15 19:17:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:35:24 -0400 |
commit | 3ac62bc0602794dc36aad77a7ef5772e989b2e22 (patch) | |
tree | 51549b3135c577d3a6af48d59f8242794ee750d5 /arch | |
parent | 89c1e79eb302349fcaf0697bc9116a4ff16bfeb0 (diff) |
x86: mtrr: if: 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")
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/if.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c index a041e094b8b9..d76f13d6d8d6 100644 --- a/arch/x86/kernel/cpu/mtrr/if.c +++ b/arch/x86/kernel/cpu/mtrr/if.c | |||
@@ -404,11 +404,10 @@ static const struct file_operations mtrr_fops = { | |||
404 | static int mtrr_seq_show(struct seq_file *seq, void *offset) | 404 | static int mtrr_seq_show(struct seq_file *seq, void *offset) |
405 | { | 405 | { |
406 | char factor; | 406 | char factor; |
407 | int i, max, len; | 407 | int i, max; |
408 | mtrr_type type; | 408 | mtrr_type type; |
409 | unsigned long base, size; | 409 | unsigned long base, size; |
410 | 410 | ||
411 | len = 0; | ||
412 | max = num_var_ranges; | 411 | max = num_var_ranges; |
413 | for (i = 0; i < max; i++) { | 412 | for (i = 0; i < max; i++) { |
414 | mtrr_if->get(i, &base, &size, &type); | 413 | mtrr_if->get(i, &base, &size, &type); |
@@ -425,11 +424,10 @@ static int mtrr_seq_show(struct seq_file *seq, void *offset) | |||
425 | size >>= 20 - PAGE_SHIFT; | 424 | size >>= 20 - PAGE_SHIFT; |
426 | } | 425 | } |
427 | /* Base can be > 32bit */ | 426 | /* Base can be > 32bit */ |
428 | len += seq_printf(seq, "reg%02i: base=0x%06lx000 " | 427 | seq_printf(seq, "reg%02i: base=0x%06lx000 (%5luMB), size=%5lu%cB, count=%d: %s\n", |
429 | "(%5luMB), size=%5lu%cB, count=%d: %s\n", | 428 | i, base, base >> (20 - PAGE_SHIFT), |
430 | i, base, base >> (20 - PAGE_SHIFT), size, | 429 | size, factor, |
431 | factor, mtrr_usage_table[i], | 430 | mtrr_usage_table[i], mtrr_attrib_to_str(type)); |
432 | mtrr_attrib_to_str(type)); | ||
433 | } | 431 | } |
434 | return 0; | 432 | return 0; |
435 | } | 433 | } |