Skip to content
  • Joe Perches's avatar
    staging: lustre: Convert uses of "int rc = seq_printf(...)" · 91b3a685
    Joe Perches authored
    The seq_printf return value, because it's frequently misused,
    will eventually be converted to void.
    
    See: commit 1f33c41c
    
     ("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: default avatarJoe Perches <joe@perches.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    91b3a685