Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbbBVMyD (ORCPT ); Sun, 22 Feb 2015 07:54:03 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:55524 "EHLO e06smtp11.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752149AbbBVMx7 (ORCPT ); Sun, 22 Feb 2015 07:53:59 -0500 Date: Sun, 22 Feb 2015 13:53:52 +0100 (CET) From: Sebastian Ott X-X-Sender: sebott@denkbrett To: Joe Perches cc: Andrew Morton , Gerald Schaefer , Peter Oberparleiter , Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 19/27] s390: Remove use of seq_printf return value In-Reply-To: <1ed484d91a317c990a6316c22382b989fc317994.1424573328.git.joe@perches.com> Message-ID: References: <1ed484d91a317c990a6316c22382b989fc317994.1424573328.git.joe@perches.com> User-Agent: Alpine 2.11 (LFD 23 2013-08-11) Organization: =?ISO-8859-15?Q?=22IBM_Deutschland_Research_&_Development_GmbH_=2F_Vorsitzende_des_Aufsichtsrats=3A_Martina_Koederitz_Gesch=E4ftsf=FChrung=3A_Dirk_Wittkopp_Sitz_der_Gesellschaft=3A_B=F6blingen_=2F_Registergericht?= =?ISO-8859-15?Q?=3A_Amtsgericht_Stuttgart=2C_HRB_243294=22?= MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15022212-0041-0000-0000-00000375E6DF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2463 Lines: 77 On Sat, 21 Feb 2015, Joe Perches wrote: > 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") > Acked-By: Sebastian Ott Regards, Sebastian > Signed-off-by: Joe Perches > --- > arch/s390/pci/pci_debug.c | 6 ++++-- > drivers/s390/cio/blacklist.c | 12 +++++++----- > 2 files changed, 11 insertions(+), 7 deletions(-) > > diff --git a/arch/s390/pci/pci_debug.c b/arch/s390/pci/pci_debug.c > index 3229a2e..c22d440 100644 > --- a/arch/s390/pci/pci_debug.c > +++ b/arch/s390/pci/pci_debug.c > @@ -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); > diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c > index b3f791b..20314aa 100644 > --- a/drivers/s390/cio/blacklist.c > +++ b/drivers/s390/cio/blacklist.c > @@ -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; > } > -- > 2.1.2 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/