Skip to content

Commit

Permalink
s390: remove use of seq_printf return value
Browse files Browse the repository at this point in the history
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41 ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Apr 15, 2015
1 parent dc640a8 commit c2f0b61
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions arch/s390/pci/pci_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ static int pci_perf_show(struct seq_file *m, void *v)

if (!zdev)
return 0;
if (!zdev->fmb)
return seq_printf(m, "FMB statistics disabled\n");
if (!zdev->fmb) {
seq_puts(m, "FMB statistics disabled\n");
return 0;
}

/* header */
seq_printf(m, "FMB @ %p\n", zdev->fmb);
Expand Down
12 changes: 7 additions & 5 deletions drivers/s390/cio/blacklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,18 +330,20 @@ cio_ignore_proc_seq_show(struct seq_file *s, void *it)
if (!iter->in_range) {
/* First device in range. */
if ((iter->devno == __MAX_SUBCHANNEL) ||
!is_blacklisted(iter->ssid, iter->devno + 1))
!is_blacklisted(iter->ssid, iter->devno + 1)) {
/* Singular device. */
return seq_printf(s, "0.%x.%04x\n",
iter->ssid, iter->devno);
seq_printf(s, "0.%x.%04x\n", iter->ssid, iter->devno);
return 0;
}
iter->in_range = 1;
return seq_printf(s, "0.%x.%04x-", iter->ssid, iter->devno);
seq_printf(s, "0.%x.%04x-", iter->ssid, iter->devno);
return 0;
}
if ((iter->devno == __MAX_SUBCHANNEL) ||
!is_blacklisted(iter->ssid, iter->devno + 1)) {
/* Last device in range. */
iter->in_range = 0;
return seq_printf(s, "0.%x.%04x\n", iter->ssid, iter->devno);
seq_printf(s, "0.%x.%04x\n", iter->ssid, iter->devno);
}
return 0;
}
Expand Down

0 comments on commit c2f0b61

Please sign in to comment.