Re: [PATCH 2/2] staging: silicom: function return fixes

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

 



On Wed, Jul 09, 2014 at 11:59:14, Greg Kroah-Hartman wrote:
> On Tue, Jul 01, 2014 at 02:33:43PM +0200, Davide Gianforte wrote:
> > +	uint32_t ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT);
> >  
> > -	ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT);
> 
> How about just removing the " = 0;" part of the variable definition?
> That would be a smaller patch, and still keep everything "clean".
> 
> thanks,
> 
> greg k-h

Also I prefer the style to keep definitions separated from assignments.
I've seen a lot of kernel code which initialize variables with function returns,
but as you said, it is not "clean", even if it is code-correct.

I'll rewrite the patch and I will send asap.

thanks
davide
_______________________________________________
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