Linux kernel staging patches
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org,
	 forest@alittletooquiet.net, linux-staging@lists.linux.dev,
	 linux-kernel@vger.kernel.org,
	Karolina Drobnik <karolinadrobnik@gmail.com>,
	 Karolina Drobnik <karolinadrobnik@gmail.com>
Subject: Re: [Outreachy kernel] [PATCH 4/7] staging: vt6655: Introduce `data` temporary variable
Date: Thu, 28 Oct 2021 13:32:58 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2110281332040.9518@hadrien> (raw)
In-Reply-To: <2039159.k92FijXA2m@localhost.localdomain>



On Thu, 28 Oct 2021, Fabio M. De Francesco wrote:

> On Thursday, October 28, 2021 12:35:34 PM CEST Karolina Drobnik wrote:
> > Add a variable to store initialization tables. Use this variable
> > in AL2230 initialization.
> >
> > Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
> > ---
> >  drivers/staging/vt6655/rf.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
> > index ea74701917e5..afd202ea3356 100644
> > --- a/drivers/staging/vt6655/rf.c
> > +++ b/drivers/staging/vt6655/rf.c
> > @@ -684,6 +684,7 @@ bool RFvWriteWakeProgSyn(struct vnt_private *priv,
> unsigned char rf_type,
> >  	unsigned short idx = MISCFIFO_SYNDATA_IDX;
> >  	unsigned char init_count = 0;
> >  	unsigned char sleep_count = 0;
> > +	const unsigned long *data;
> >
> >  	VNSvOutPortW(iobase + MAC_REG_MISCFFNDEX, 0);
> >  	switch (rf_type) {
> > @@ -699,8 +700,9 @@ bool RFvWriteWakeProgSyn(struct vnt_private *priv,
> unsigned char rf_type,
> >  		if (init_count > (MISCFIFO_SYNDATASIZE - sleep_count))
> >  			return false;
> >
> > +		data = al2230_init_table;
> >  		for (i = 0; i < CB_AL2230_INIT_SEQ; i++)
> > -			MACvSetMISCFifo(priv, idx++,
> al2230_init_table[i]);
> > +			MACvSetMISCFifo(priv, idx++, *(data++));
>
> Hi Karolina,
>
> I think you are using redundant parentheses in "* (data ++)" but understand
> that those increments and dereferences are equivalent to "* data ++"
> (according to the C precedence rules).
>
> Some time ago I suggested that you use those redundant parentheses because
> Greg Kroah-Hartman had previously explained that he prefers not to see
> "*foo++" because maintainers and reviewers are not required to remember the C
> precedence rules.
>
> I hope my suggestion isn't based on a misunderstanding of what Greg wants
> here and that your patch can be accepted as is.
>
> While we are at it, please notice that Maintainers of different subsystems
> may see this topic from a different point of view and that they might very
> well ask you for removing those redundant parentheses.
>
> I'd suggest to use grep and find out what is preferred in other subsystems,
> when you want to contribute to other parts of Linux.

Would it be better as data[i] ?

Could there be a better name than "data"?  Perhaps "table"?

julia


>
> Thanks,
>
> Fabio
>
> >  		MACvSetMISCFifo(priv, idx++,
> al2230_channel_table0[channel - 1]);
> >  		MACvSetMISCFifo(priv, idx++,
> al2230_channel_table1[channel - 1]);
> > --
> > 2.30.2
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/
> outreachy-kernel/dc72a4c3539aed70569f66396ed3b51818bc2aea.
> 1635415820.git.karolinadrobnik%40gmail.com.
> >
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/2039159.k92FijXA2m%40localhost.localdomain.
>

  reply	other threads:[~2021-10-28 11:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 10:35 [PATCH 0/7] staging: vt6655: Fix line wrapping in `RFvWriteWakeProgSyn` Karolina Drobnik
2021-10-28 10:35 ` [PATCH 1/7] staging: vt6655: Introduce `idx` temporary variable Karolina Drobnik
2021-10-29 14:47   ` [Outreachy kernel] " Praveen Kumar
2021-11-04 12:05   ` Dan Carpenter
2021-10-28 10:35 ` [PATCH 2/7] staging: vt6655: Use incrementation in `idx` Karolina Drobnik
2021-10-29 14:56   ` [Outreachy kernel] " Praveen Kumar
2021-10-29 15:41     ` Praveen Kumar
2021-11-01  9:47       ` Karolina Drobnik
2021-10-28 10:35 ` [PATCH 3/7] staging: vt6655: Remove unused `i` increments Karolina Drobnik
2021-10-28 10:35 ` [PATCH 4/7] staging: vt6655: Introduce `data` temporary variable Karolina Drobnik
2021-10-28 11:21   ` [Outreachy kernel] " Fabio M. De Francesco
2021-10-28 11:32     ` Julia Lawall [this message]
2021-10-28 11:48       ` Fabio M. De Francesco
2021-10-28 14:31         ` Karolina Drobnik
2021-10-28 14:40           ` Julia Lawall
2021-10-28 10:35 ` [PATCH 5/7] staging: vt6655: Rewrite conditional in AL7320 initialization Karolina Drobnik
2021-10-28 12:36   ` [Outreachy kernel] " Fabio M. De Francesco
2021-10-28 13:06     ` Julia Lawall
2021-10-28 14:35       ` Karolina Drobnik
2021-10-28 15:36         ` Fabio M. De Francesco
2021-10-28 10:35 ` [PATCH 6/7] staging: vt6655: Rename `RFvWriteWakeProgSyn` function Karolina Drobnik
2021-10-28 10:35 ` [PATCH 7/7] staging: vt6655: Update comment for `rf_write_wake_prog_syn` Karolina Drobnik

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=alpine.DEB.2.22.394.2110281332040.9518@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=fmdefrancesco@gmail.com \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=karolinadrobnik@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy-kernel@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox