mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 16:11:38 +00:00
abb95b7550
currently we have multiple #ifdef CONFIG_PCI_IOV blocks spread over different compliation units and headers, all dealing with SR-IOV specific behavior. This violates the style guide which discourages conditionally compiled code blocks and hinders maintainability by speading SR-IOV functionality over many files. Let's move all of this into a conditionally compiled pci_iov.c file and local header and prefix SR-IOV specific functions with zpci_iov_*. Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
31 lines
752 B
C
31 lines
752 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
|
|
|
|
#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 */
|