mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
de786f0f83
While pci_iov.h has include guards it doesn't include the necessary header for struct zpci_dev, pci_bus.h on the other hand lacks even basic include guards. This isn't only fragile and breaks convention but also confuses tooling such as clang-analyzer. Add both include guards and the necessary includes. Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
33 lines
776 B
C
33 lines
776 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright IBM Corp. 2020
|
|
*
|
|
* Author(s):
|
|
* Niklas Schnelle <schnelle@linux.ibm.com>
|
|
*
|
|
*/
|
|
|
|
#ifndef __S390_PCI_IOV_H
|
|
#define __S390_PCI_IOV_H
|
|
|
|
#include <linux/pci.h>
|
|
|
|
#ifdef CONFIG_PCI_IOV
|
|
void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn);
|
|
|
|
void zpci_iov_map_resources(struct pci_dev *pdev);
|
|
|
|
int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn);
|
|
|
|
#else /* CONFIG_PCI_IOV */
|
|
static inline void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn) {}
|
|
|
|
static inline void zpci_iov_map_resources(struct pci_dev *pdev) {}
|
|
|
|
static inline int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif /* CONFIG_PCI_IOV */
|
|
#endif /* __S390_PCI_IOV_h */
|