lkml.org 
[lkml]   [2015]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/27] staging: lustre: Convert uses of "int rc = seq_printf(...)"
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 <joe@perches.com>
> Cc: Oleg Drokin <oleg.drokin@intel.com>
> Cc: Andreas Dilger <andreas.dilger@intel.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 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


\
 
 \ /
  Last update: 2015-03-02 02:41    [W:0.262 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site