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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux