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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 20 Jul 2021 11:32:15 +0200
From:   Niklas Schnelle <schnelle@...ux.ibm.com>
To:     Bjorn Helgaas <bhelgaas@...gle.com>
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-arch@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] PCI: Move pci_dev_is/assign_added() to pci.h

On Tue, 2021-07-20 at 10:34 +0200, Niklas Schnelle wrote:
> On Mon, 2021-07-19 at 14:11 +0200, Niklas Schnelle wrote:
> > The helper function pci_dev_is_added() from drivers/pci/pci.h is used in
> > PCI arch code of both s390 and powerpc leading to awkward relative
> > includes. Move it to the global include/linux/pci.h and get rid of these
> > includes just for that one function.
> > 
> > Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
> > ---
> > 
> ... snip ...
> >  
> >  static LIST_HEAD(bridge_list);
> > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> > index 93dcdd431072..a159cd0f6f05 100644
> > --- a/drivers/pci/pci.h
> > +++ b/drivers/pci/pci.h
> > @@ -383,21 +383,6 @@ static inline bool pci_dev_is_disconnected(const struct pci_dev *dev)
> >  	return dev->error_state == pci_channel_io_perm_failure;
> >  }
> >  
> > -/* pci_dev priv_flags */
> > -#define PCI_DEV_ADDED 0
> > -#define PCI_DPC_RECOVERED 1
> > -#define PCI_DPC_RECOVERING 2
> 
> Sorry, the above two PCI_DPC_* lines should remain in drivers/pci/pci.h
> I messed this up on rebasing to v5.14-rc1 and it didn't lead to
> problems on either s390x defconfig, nor pp64_defconfig but breaks ppc
> allyesconfig. Will resend a fixed version.

Ok looking at this more closely, maybe it would also make sense to move
the PCI_DPC_* flags also to include/linux/pci.h that would also put
them in direct proximity of the priv_flags field decleration itself
which I think also improves maintainability.

> 
> 
> .. snip ..
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ