Re: [PATCH] staging: pi433: move get version func to where all other functions are

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

 



On Thu, Jan 06, 2022 at 10:19:46AM +0000, Sidong Yang wrote:
> > +int rf69_get_chip_version(struct spi_device *spi)
> > +{
> > +	int retval;
> > +
> > +	retval = rf69_read_reg(spi, REG_VERSION);
> > +	return retval;
> > +}
> > +
> If we don't modify retval, why don't we just return directly without
> retval?

fair point, I will change that.

> > @@ -17,6 +17,7 @@
> >  #define FIFO_SIZE	66		/* bytes */
> >  #define FIFO_THRESHOLD	15		/* bytes */
> >  
> > +int rf69_get_chip_version(struct spi_device *spi);
> IMHO, I think that we don't need to include 'chip'. Because all other
> functions in this code don't have 'chip' in function name. and version
> code seems to be more accurate representation.
> 

will change that too. Thanks for taking the time to review this patch.

thanks,

Paulo A.




[Index of Archives]     [Linux Driver Development]     [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