parisc: 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 1f33c41c03
("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")
Signed-off-by: Joe Perches <joe@perches.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
d50f8f8d91
commit
e693d73c20
@@ -1021,7 +1021,6 @@ static struct hppa_dma_ops ccio_ops = {
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static int ccio_proc_info(struct seq_file *m, void *p)
|
||||
{
|
||||
int len = 0;
|
||||
struct ioc *ioc = ioc_list;
|
||||
|
||||
while (ioc != NULL) {
|
||||
@@ -1031,22 +1030,22 @@ static int ccio_proc_info(struct seq_file *m, void *p)
|
||||
int j;
|
||||
#endif
|
||||
|
||||
len += seq_printf(m, "%s\n", ioc->name);
|
||||
seq_printf(m, "%s\n", ioc->name);
|
||||
|
||||
len += seq_printf(m, "Cujo 2.0 bug : %s\n",
|
||||
(ioc->cujo20_bug ? "yes" : "no"));
|
||||
seq_printf(m, "Cujo 2.0 bug : %s\n",
|
||||
(ioc->cujo20_bug ? "yes" : "no"));
|
||||
|
||||
len += seq_printf(m, "IO PDIR size : %d bytes (%d entries)\n",
|
||||
total_pages * 8, total_pages);
|
||||
seq_printf(m, "IO PDIR size : %d bytes (%d entries)\n",
|
||||
total_pages * 8, total_pages);
|
||||
|
||||
#ifdef CCIO_COLLECT_STATS
|
||||
len += seq_printf(m, "IO PDIR entries : %ld free %ld used (%d%%)\n",
|
||||
total_pages - ioc->used_pages, ioc->used_pages,
|
||||
(int)(ioc->used_pages * 100 / total_pages));
|
||||
seq_printf(m, "IO PDIR entries : %ld free %ld used (%d%%)\n",
|
||||
total_pages - ioc->used_pages, ioc->used_pages,
|
||||
(int)(ioc->used_pages * 100 / total_pages));
|
||||
#endif
|
||||
|
||||
len += seq_printf(m, "Resource bitmap : %d bytes (%d pages)\n",
|
||||
ioc->res_size, total_pages);
|
||||
seq_printf(m, "Resource bitmap : %d bytes (%d pages)\n",
|
||||
ioc->res_size, total_pages);
|
||||
|
||||
#ifdef CCIO_COLLECT_STATS
|
||||
min = max = ioc->avg_search[0];
|
||||
@@ -1058,26 +1057,26 @@ static int ccio_proc_info(struct seq_file *m, void *p)
|
||||
min = ioc->avg_search[j];
|
||||
}
|
||||
avg /= CCIO_SEARCH_SAMPLE;
|
||||
len += seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n",
|
||||
min, avg, max);
|
||||
seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n",
|
||||
min, avg, max);
|
||||
|
||||
len += seq_printf(m, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n",
|
||||
ioc->msingle_calls, ioc->msingle_pages,
|
||||
(int)((ioc->msingle_pages * 1000)/ioc->msingle_calls));
|
||||
seq_printf(m, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n",
|
||||
ioc->msingle_calls, ioc->msingle_pages,
|
||||
(int)((ioc->msingle_pages * 1000)/ioc->msingle_calls));
|
||||
|
||||
/* KLUGE - unmap_sg calls unmap_single for each mapped page */
|
||||
min = ioc->usingle_calls - ioc->usg_calls;
|
||||
max = ioc->usingle_pages - ioc->usg_pages;
|
||||
len += seq_printf(m, "pci_unmap_single: %8ld calls %8ld pages (avg %d/1000)\n",
|
||||
min, max, (int)((max * 1000)/min));
|
||||
seq_printf(m, "pci_unmap_single: %8ld calls %8ld pages (avg %d/1000)\n",
|
||||
min, max, (int)((max * 1000)/min));
|
||||
|
||||
len += seq_printf(m, "pci_map_sg() : %8ld calls %8ld pages (avg %d/1000)\n",
|
||||
ioc->msg_calls, ioc->msg_pages,
|
||||
(int)((ioc->msg_pages * 1000)/ioc->msg_calls));
|
||||
seq_printf(m, "pci_map_sg() : %8ld calls %8ld pages (avg %d/1000)\n",
|
||||
ioc->msg_calls, ioc->msg_pages,
|
||||
(int)((ioc->msg_pages * 1000)/ioc->msg_calls));
|
||||
|
||||
len += seq_printf(m, "pci_unmap_sg() : %8ld calls %8ld pages (avg %d/1000)\n\n\n",
|
||||
ioc->usg_calls, ioc->usg_pages,
|
||||
(int)((ioc->usg_pages * 1000)/ioc->usg_calls));
|
||||
seq_printf(m, "pci_unmap_sg() : %8ld calls %8ld pages (avg %d/1000)\n\n\n",
|
||||
ioc->usg_calls, ioc->usg_pages,
|
||||
(int)((ioc->usg_pages * 1000)/ioc->usg_calls));
|
||||
#endif /* CCIO_COLLECT_STATS */
|
||||
|
||||
ioc = ioc->next;
|
||||
@@ -1101,7 +1100,6 @@ static const struct file_operations ccio_proc_info_fops = {
|
||||
|
||||
static int ccio_proc_bitmap_info(struct seq_file *m, void *p)
|
||||
{
|
||||
int len = 0;
|
||||
struct ioc *ioc = ioc_list;
|
||||
|
||||
while (ioc != NULL) {
|
||||
@@ -1110,11 +1108,11 @@ static int ccio_proc_bitmap_info(struct seq_file *m, void *p)
|
||||
|
||||
for (j = 0; j < (ioc->res_size / sizeof(u32)); j++) {
|
||||
if ((j & 7) == 0)
|
||||
len += seq_puts(m, "\n ");
|
||||
len += seq_printf(m, "%08x", *res_ptr);
|
||||
seq_puts(m, "\n ");
|
||||
seq_printf(m, "%08x", *res_ptr);
|
||||
res_ptr++;
|
||||
}
|
||||
len += seq_puts(m, "\n\n");
|
||||
seq_puts(m, "\n\n");
|
||||
ioc = ioc->next;
|
||||
break; /* XXX - remove me */
|
||||
}
|
||||
|
Reference in New Issue
Block a user