Re: [PATCH 2/6] staging: ks7010: replace identifier retval with rc

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

 



On Thu, Mar 16, 2017 at 02:29:04PM +0300, Dan Carpenter wrote:
> On Thu, Mar 16, 2017 at 11:40:47AM +0900, Greg Kroah-Hartman wrote:
> > On Tue, Mar 14, 2017 at 09:20:13PM +1100, Tobin C. Harding wrote:
> > > Code uses identifiers retval, ret, and rc all for function return
> > > values. It would be more readable if the whole driver used a single
> > > identifier for this task. Lets use 'rc' since it is the shortest.
> > > 
> > > Change retval -> rc
> > 
> > Ick, retval is much more readable, please use that.
> > 
> 
> Or "ret" is probably the most common.

fight!

$ git grep -e 'int ret;' --or -e 'int ret =' | wc -l
36610

$ git grep -e 'int retval;' --or -e 'int retval =' | wc -l
2420

$ git grep -e 'int rc;' --or -e 'int rc =' | wc -l
8307

*ouch*! 'retval' is more readable, 'rc' is shorter but perfectly
descriptive and 'ret' is just plain common.


thanks,
Tobin.
_______________________________________________
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