From 0f454d0c04a9bcc84134f18f3bee48a37fc913da Mon Sep 17 00:00:00 2001 From: Zvonko Kaiser Date: Fri, 30 Jun 2023 08:42:55 +0000 Subject: [PATCH] gpu: Fixing typos for PCIe topology changes Some comments and functions had typos and wrong capitalization. Signed-off-by: Zvonko Kaiser --- src/runtime/pkg/device/config/config.go | 4 ++-- src/runtime/pkg/device/drivers/utils.go | 2 +- src/runtime/pkg/oci/utils.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/pkg/device/config/config.go b/src/runtime/pkg/device/config/config.go index c65e861233..32f2251ff6 100644 --- a/src/runtime/pkg/device/config/config.go +++ b/src/runtime/pkg/device/config/config.go @@ -188,7 +188,7 @@ var PCIePortPrefixMapping = map[PCIePort]PCIePortBusPrefix{ BridgePort: PCIBridgePortPrefix, } -func (p PCIePort) InValid() bool { +func (p PCIePort) Invalid() bool { switch p { case RootPort: fallthrough @@ -374,7 +374,7 @@ const ( VFIOAPDeviceMediatedType ) -// VFIOPCIDev represents a VFIO PCI device used for hotplugging +// VFIODev represents a VFIO PCI device used for hotplugging type VFIODev struct { // ID is used to identify this drive in the hypervisor options. ID string diff --git a/src/runtime/pkg/device/drivers/utils.go b/src/runtime/pkg/device/drivers/utils.go index ddb1a0ded3..8c9055ae25 100644 --- a/src/runtime/pkg/device/drivers/utils.go +++ b/src/runtime/pkg/device/drivers/utils.go @@ -47,7 +47,7 @@ func deviceLogger() *logrus.Entry { return api.DeviceLogger() } -// IsPCIeDevice Identifies PCIe device by reading the size of the PCI config space +// IsPCIeDevice identifies PCIe device by reading the size of the PCI config space // Plain PCI device have 256 bytes of config space where PCIe devices have 4K func IsPCIeDevice(bdf string) bool { if len(strings.Split(bdf, ":")) == 2 { diff --git a/src/runtime/pkg/oci/utils.go b/src/runtime/pkg/oci/utils.go index 21e0271603..d782211dd1 100644 --- a/src/runtime/pkg/oci/utils.go +++ b/src/runtime/pkg/oci/utils.go @@ -579,7 +579,7 @@ func addHypervisorPCIePortOverride(value string) (config.PCIePort, error) { return config.NoPort, nil } port := config.PCIePort(value) - if port.InValid() { + if port.Invalid() { return config.InvalidPort, fmt.Errorf("Invalid PCIe port \"%v\" specified in annotation", value) } return port, nil