staging: lustre: Convert uses of "int rc = seq_printf(...)"
authorJoe Perches <joe@perches.com>
Mon, 2 Mar 2015 03:58:57 +0000 (19:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 04:19:01 +0000 (20:19 -0800)
commit91b3a68558ba37c69f1d9e2d23e34c3cba38e356
tree8cafb1d53f02696e16ab812d2fff35bb42cacd03
parentf9be10850f533895c360e2692a34a5be1d21cd8d
staging: lustre: Convert uses of "int rc = seq_printf(...)"

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/fid/lproc_fid.c
drivers/staging/lustre/lustre/llite/lproc_llite.c
drivers/staging/lustre/lustre/mdc/lproc_mdc.c
drivers/staging/lustre/lustre/osc/lproc_osc.c
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c