public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Cc: Iain Craig <coldcity@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-staging@lists.linux.dev,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: mt7621-pci: fix a multiple assignment code style issue
Date: Tue, 27 Apr 2021 20:09:43 +0200	[thread overview]
Message-ID: <YIhTZ2lezb485iFp@kroah.com> (raw)
In-Reply-To: <CAMhs-H_jfdTV4JYD+_Xy+1w452AjjAut-jjFhEt+GmLjTw8+8A@mail.gmail.com>

On Tue, Apr 27, 2021 at 07:55:30PM +0200, Sergio Paracuellos wrote:
> Hi Iain.
> 
> On Tue, Apr 27, 2021 at 7:47 PM Iain Craig <coldcity@gmail.com> wrote:
> >
> > avoid multiple assignments while setting pcie->io members to NULL.
> >
> > Signed-off-by: Iain Craig <coldcity@gmail.com>
> > ---
> >  drivers/staging/mt7621-pci/pci-mt7621.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
> > index 115250115f10..f3b5b8ac03b5 100644
> > --- a/drivers/staging/mt7621-pci/pci-mt7621.c
> > +++ b/drivers/staging/mt7621-pci/pci-mt7621.c
> > @@ -306,7 +306,9 @@ static int mt7621_pci_parse_request_of_pci_ranges(struct pci_host_bridge *host)
> >          * resource manually instead.
> >          */
> >         pcie->io.name = node->full_name;
> > -       pcie->io.parent = pcie->io.child = pcie->io.sibling = NULL;
> > +       pcie->io.parent = NULL;
> > +       pcie->io.child = NULL;
> > +       pcie->io.sibling = NULL;
> 
> In this particular case I think the original code is correct as it is.
> Also this is the style used around different kernel places to assign
> these fields.

THe original is fine.

thanks,

greg k-h

      reply	other threads:[~2021-04-27 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 17:47 [PATCH] staging: mt7621-pci: fix a multiple assignment code style issue Iain Craig
2021-04-27 17:55 ` Sergio Paracuellos
2021-04-27 18:09   ` Greg Kroah-Hartman [this message]

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=YIhTZ2lezb485iFp@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=coldcity@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=matthias.bgg@gmail.com \
    --cc=sergio.paracuellos@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox