Messages in this thread Patch in this message | | | Date | Fri, 7 Jan 2022 09:14:30 +1300 | From | Paulo Miguel Almeida <> | Subject | Re: [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.
| |