All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
To: Sidong Yang <realwakka@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: pi433: move get version func to where all other functions are
Date: Fri, 7 Jan 2022 09:14:30 +1300	[thread overview]
Message-ID: <20220106201430.GA3416@mail.google.com> (raw)
In-Reply-To: <20220106101946.GA23794@realwakka>

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.

  reply	other threads:[~2022-01-06 20:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06  9:31 [PATCH] staging: pi433: move get version func to where all other functions are Paulo Miguel Almeida
2022-01-06 10:19 ` Sidong Yang
2022-01-06 20:14   ` Paulo Miguel Almeida [this message]
2022-01-06 21:33     ` [PATCH v2] " Paulo Miguel Almeida
2022-01-07  8:53       ` Dan Carpenter
2022-01-07 19:24         ` Paulo Miguel Almeida
2022-01-08 11:19           ` Dan Carpenter
2022-01-08 16:36             ` Sidong Yang
2022-01-08 21:02               ` Paulo Miguel Almeida
2022-01-08 20:59             ` Paulo Miguel Almeida
2022-01-08 21:27               ` [PATCH v3] " Paulo Miguel Almeida
2022-01-06 14:04 ` [PATCH] " Greg KH
2022-01-06 21:01   ` Paulo Miguel Almeida
2022-01-07  8:32 ` Dan Carpenter
2022-01-07 18:45   ` Paulo Miguel Almeida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220106201430.GA3416@mail.google.com \
    --to=paulo.miguel.almeida.rodenas@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=realwakka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.