lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 27 Apr 2021 20:09:43 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Sergio Paracuellos <sergio.paracuellos@...il.com>
Cc:     Iain Craig <coldcity@...il.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-staging@...ts.linux.dev,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: mt7621-pci: fix a multiple assignment code
 style issue

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@...il.com> wrote:
> >
> > avoid multiple assignments while setting pcie->io members to NULL.
> >
> > Signed-off-by: Iain Craig <coldcity@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ