lkml.org 
[lkml]   [2022]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] staging: pi433: move get version func to where all other functions are
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.

\
 
 \ /
  Last update: 2022-01-06 21:15    [W:0.096 / U:2.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site