]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/pci: Add header guards and includes to internal headers
authorNiklas Schnelle <schnelle@linux.ibm.com>
Tue, 5 Nov 2024 16:28:16 +0000 (17:28 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 7 Nov 2024 09:37:00 +0000 (10:37 +0100)
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>
arch/s390/pci/pci_bus.h
arch/s390/pci/pci_iov.h

index af9f0ac79a1b1b8a249e7a22703f3dec45dcdad8..e86a9419d233f7e7bd0c19495074968ad22ef340 100644 (file)
@@ -6,6 +6,10 @@
  *   Pierre Morel <pmorel@linux.ibm.com>
  *
  */
+#ifndef __S390_PCI_BUS_H
+#define __S390_PCI_BUS_H
+
+#include <linux/pci.h>
 
 int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops);
 void zpci_bus_device_unregister(struct zpci_dev *zdev);
@@ -40,3 +44,4 @@ static inline struct zpci_dev *zdev_from_bus(struct pci_bus *bus,
        return (devfn >= ZPCI_FUNCTIONS_PER_BUS) ? NULL : zbus->function[devfn];
 }
 
+#endif /* __S390_PCI_BUS_H */
index b2c828003bad0a74559c374d8bc91e40c4a24ead..e3fa4e77fc867adbf968ede1f22807ffac6278da 100644 (file)
@@ -10,6 +10,8 @@
 #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);