From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753416AbbCBBWL (ORCPT ); Sun, 1 Mar 2015 20:22:11 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51509 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751967AbbCBBWH (ORCPT ); Sun, 1 Mar 2015 20:22:07 -0500 Date: Sun, 1 Mar 2015 17:22:06 -0800 From: Greg Kroah-Hartman To: Joe Perches Cc: Andrew Morton , linux-kernel@vger.kernel.org, Oleg Drokin , Andreas Dilger , HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org Subject: Re: [PATCH 03/27] staging: lustre: Convert uses of "int rc = seq_printf(...)" Message-ID: <20150302012206.GA2602@kroah.com> References: <1a7df734af39aa40cc6af27ff929d2207b9a838b.1424573328.git.joe@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a7df734af39aa40cc6af27ff929d2207b9a838b.1424573328.git.joe@perches.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 21, 2015 at 06:53:30PM -0800, 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") > > Convert these uses to: > > seq_printf(seq, ...); > > return 0; > > Done via cocci script: > > @@ > struct seq_file *seq; > int i; > @@ > - i = seq_printf(seq, > + seq_printf(seq, > ...); > ... > - return i; > + return 0; > > @@ > struct seq_file *seq; > int i; > @@ > - i = 0; > - i += seq_printf(seq, > + seq_printf(seq, > ...); > ... > - return i; > + return 0; > > With some additional reformatting and typing post conversion > to remove the now unnecessary "int i;" declaration. > > Signed-off-by: Joe Perches > Cc: Oleg Drokin > Cc: Andreas Dilger > Signed-off-by: Andrew Morton > --- > drivers/staging/lustre/lustre/fid/lproc_fid.c | 23 +++--- > drivers/staging/lustre/lustre/llite/lproc_llite.c | 5 +- > drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 6 +- > drivers/staging/lustre/lustre/osc/lproc_osc.c | 45 ++++++------ > .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 5 +- > drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 82 +++++++++++----------- > 6 files changed, 79 insertions(+), 87 deletions(-) This patch fails to apply to my tree anymore :( Can you refresh it against the staging-testing branch of staging.git and resend? thanks, greg k-h