Re: [PATCH 03/27] staging: lustre: Convert uses of "int rc = seq_printf(...)"

From: Greg Kroah-Hartman
Date: Sun Mar 01 2015 - 20:22:14 EST


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@xxxxxxxxxxx>
> Cc: Oleg Drokin <oleg.drokin@xxxxxxxxx>
> Cc: Andreas Dilger <andreas.dilger@xxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/